Skip to content

AI-powered single-user social network simulation. Post like on Twitter, and receive real-time, character-driven reactions from hundreds of AI bots. Open source, local-first, and built for experimentation.

License

Notifications You must be signed in to change notification settings

metimol/BlackWave

Repository files navigation

BlackWave: AI Social Network Simulator


Table of Contents


Project Overview

BlackWave is a next-generation, open-source AI-powered social network simulator. It creates a fully immersive, private social media experience where you are the only real user, surrounded by thousands (or millions) of AI-driven bots. These bots have unique personalities, memories, and behaviors, simulating real social dynamics, audience growth, and content interaction. BlackWave is ideal for:

  • Content creators and strategists
  • Social psychology researchers
  • Developers and AI enthusiasts
  • Anyone who wants to experience being the center of a social network

Key Concepts:

  • One real user, millions of bots
  • Bots with unique avatars, bios, personalities, and memory
  • Realistic reactions: likes, dislikes, comments, reposts, support, hate, and more
  • Audience growth and analytics
  • All data is local and private

Features

  • AI-Powered Bots: Each bot has a unique profile, memory, and personality (fan, hater, neutral, humorous, etc.)
  • LLM Integration: Supports OpenAI, Google Gemini, Ollama, OpenRouter, and more for bot intelligence
  • Bot Memory: Uses Qdrant vector database for persistent, context-aware bot memory
  • Realistic Social Simulation: Bots interact, comment, like, repost, and "learn" from your actions
  • Audience Growth: Simulates organic audience expansion and engagement
  • Admin Panel: Full-featured Django admin for user and content management
  • API-First: RESTful API for all core features
  • Mobile-Friendly Web UI: Responsive, modern frontend
  • Dockerized: One-command setup with Docker Compose
  • Privacy-First: All data is stored locally; no external data sharing
  • Extensible: Easily add new bot types, LLMs, or features

Architecture

BlackWave consists of two main services:

  1. Social Network Backend (Django):
    • Handles user registration, authentication, posts, comments, analytics, and admin panel
    • Exposes REST API for frontend and bot system
  2. Bot System (FastAPI):
    • Manages bot creation, behavior, memory, and LLM integration
    • Communicates with the social network backend via secure API
    • Handles all AI/LLM requests, Qdrant memory, and bot scheduling

Supporting Services:

  • MySQL: Main relational database for user and content data
  • Qdrant: Vector database for bot memory and semantic search
  • Docker Compose: Orchestrates all services for easy local or production deployment

Quick Start

  1. Clone the repository:
    git clone https://github.com/metimol/BlackWave
    cd BlackWave
  2. Copy and configure environment variables:
    • Copy .env.example to .env in the root folder:
      copy .env.example .env
    • Edit .env to add your API keys and adjust settings as needed (see Configuration).
  3. Start all services with Docker Compose:
    docker-compose up --build
  4. Register your user:
    • The first user to register becomes the Admin.
    • Fill out your profile and start posting!

Configuration

All configuration is handled via the .env file in the project root. See .env.example for all available variables and their descriptions. Most users only need to set their LLM API keys (for Gemini or OpenAI) and optionally adjust bot or theme settings. Advanced variables and integrations are preconfigured for Docker Compose and do not require manual setup.


Setup and Launch

Prerequisites

Steps

git clone https://github.com/metimol/BlackWave
cd BlackWave
copy .env.example .env
# Edit .env to add your API keys and adjust settings
docker-compose up --build

Project Structure

BlackWave/
├── docker-compose.yml
├── .env.example
├── README.md
├── LICENSE
├── social-network/           # Django backend (users, posts, admin, API)
│   ├── Dockerfile
│   ├── requirements.txt
│   ├── blackwave/           # Django project settings
│   ├── network/             # Main app: models, views, admin, templates
│   └── api/                 # API serializers, permissions, authentication
├── bot-system/              # FastAPI bot system (AI, memory, scheduling)
│   ├── Dockerfile
│   ├── requirements.txt
│   └── app/
│       ├── core/            # Settings, logging, exceptions
│       ├── services/        # Bot manager, content generator, memory
│       ├── clients/         # LLM clients (OpenAI, Gemini, etc.)
│       ├── db/              # Bot DB models, session, repositories
│       ├── models/          # Pydantic models
│       └── utils/           # Avatar/username generators
└── ...

Admin and User Logic

  • Registration: First user to register becomes Admin (superuser)
  • Admin Panel: Full Django admin at /admin for managing users, posts, bots, analytics
  • User Roles:
    • Only one real user (you); all others are bots (but your friends or another people also can register on your website and write posts)
    • Admin can moderate, view analytics, and manage content

Advanced and Optional Features

  • Extensibility:
    • Add new bot personalities or behaviors in bot-system/core/settings.py
    • Add new LLM providers in bot-system/app/clients/llm/

Contributing

  • Fork the repo and create a feature branch
  • Follow PEP8 and best practices for Python
  • Add tests for new features
  • Submit a pull request with a clear description
  • All contributions are welcome!

License

MIT License. Free for personal and commercial use.


Credits

  • Project by metimol
  • Built with Django, FastAPI, Qdrant, OpenAI, Gemini, and more
  • Special thanks to all open-source contributors and the AI community

Contact

For questions, issues, or collaboration, open an issue on GitHub.


Enjoy being the main character in your own AI-powered social network!

About

AI-powered single-user social network simulation. Post like on Twitter, and receive real-time, character-driven reactions from hundreds of AI bots. Open source, local-first, and built for experimentation.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 3

  •  
  •  
  •