Inspiration
In contemporary generative AI workflows, synthetic media models produce photorealistic text, imagery, and video at near-zero marginal cost. However, when AI agents simulate alternate timelines or geopolitical counterfactuals, a critical trust gap emerges: how can downstream consumers, auditors, and web platforms cryptographically verify whether a piece of synthetic media represents consensus real-world history or an isolated, counterfactual simulation?
RealityShift bridges this gap. It is an enterprise-grade multi-agent geopolitical simulation and authenticated generative media plane. In RealityShift, 249 autonomous AI national agents (orchestrated via Llama 3.3 70B on Groq) continuously evaluate real-world state vectors (GDP per capita, military expenditure, health/education spending, tax rates, unemployment) and execute strategic national policy decisions.
When a user or agent forks reality, the simulation triggers an automated multi-modal media pipeline. This pipeline generates authentic retro newspaper front pages and 720p TV news broadcasts documenting events that never occurred in consensus reality.
To enforce strict synthetic transparency and media integrity: $$\text{real_world_data_cutoff} \equiv \text{divergence_date}$$
Every generated image, video clip, and news manifest is cryptographically bound to a SHA-256 simulation provenance record using the Backblaze Genblaze SDK and stored durably on Backblaze B2 Cloud Storage.
What it does
RealityShift fuses an interactive geopolitical wargame interface with an automated, provenance-enforced generative media engine:
1. Multi-Agent Geopolitical Wargame & 249-Country Table (/world)
- Full Geopolitical State Matrix: Tracks state vectors for all 249 ISO 3166-1 standard nations using real-world baseline metrics derived from the World Bank API.
- 3D Cel-Shaded Earth Visualizer: High-performance CesiumJS WebGL globe with dynamic vector hover highlights and 0-overhead country boundary rendering.
🎮 COMMANDTakeover Mode: Allows users to assume executive control of any nation, modify fiscal/defense policy vectors, and trigger real-time simulation forks.
2. Autonomous Agentic Divergence Engine
- Llama 3.3 70B Reasoning Agents: National agents evaluate fiscal tradeoffs, compute historical parallels (e.g., mapping 2026 semiconductor grants to the 1958 National Defense Education Act, $\text{similarity_score} = 0.88$), and log structured policy rationales into the state history.
- Monthly Self-Correction: Integrates real-world headlines via NewsAPI.org for consensus reality alignment prior to fork divergence points.
3. Provenance-Enforced Media Generation Engine
- Newspaper Front Page Wall: Generates 1024×1365 vintage newspaper front pages (The Washington Chronicle, The Hindustan Times, The Daily Telegraph, The Beijing Globe, Moscow Times) combining local SDXL-Turbo diffusion art, Groq-generated headlines, and Pillow vector typography compositing.
- Divergence TV Broadcasts: Produces 45–75 second AI TV news segments featuring anchor voiceovers (macOS TTS), Ken Burns camera animation (
ffmpeg zoompan), news chyrons, and burned-in synthetic disclaimers.
4. B2-Native Media Newsstand & Kiosk (/wall)
- Zero-Database Media Read Path: Reads per-fork media indices straight from Backblaze B2 (
index/{world_id}/media.json) and streams high-resolution PNGs and MP4s via presigned URLs. - Interactive Lightbox & Provenance Inspector: Full-screen modal viewing with one-click SHA-256 manifest inspection and file extraction.
How we built it
RealityShift is built on a decoupled three-tier architecture:
+------------------------------------------------------------------------+ | REALITYSHIFT SYSTEM ARCHITECTURE | +------------------------------------------------------------------------+ | 1. FRONTEND / CLIENT LAYER (React 19 + TypeScript + Vite + CesiumJS) | | - Wargame HUD, 249-Country Table, Lightbox Modal, Broadcast Player | | - Streams media directly from B2 via presigned URLs (0 DB overhead) | +------------------------------------------------------------------------+ | 2. SIMULATION LAYER (Cloudflare Workers + Supabase Postgres + Groq) | | - Llama 3.3 70B Autonomous Agents, World Bank Baseline Metrics | | - State Vector Transitions: GDP, Tax Rate, Military/Edu/Health % | +------------------------------------------------------------------------+ | 3. MEDIA & PROVENANCE PLANE (Genblaze SDK + Backblaze B2 Storage) | | - Genblaze (v0.4.5), genblaze-core (v0.3.8), genblaze-s3 (v0.3.6) | | - Content-Addressable Asset Store: assets/{sha[:2]}/{sha[2:4]}/{sha}| | - Provenance Manifests: Hash-bound simulation metadata in B2 | +------------------------------------------------------------------------+
Backblaze B2 Data Orchestration
Backblaze B2 serves as the sole media plane for RealityShift:
- Durable Media Store: Holds generated newspaper PNGs (1024×1365) and MP4 TV broadcasts.
- Provenance Manifests: Stores JSON manifests containing canonical hashes and simulation metadata alongside every media asset.
- Per-Fork Media Index (
index/{world_id}/media.json): Replaces relational media tables entirely. The batch pipeline writes the index straight to B2, allowing zero-latency frontend streaming without database or Worker API round-trips. - Content-Addressable Deduplication: Configured with
KeyStrategy.CONTENT_ADDRESSABLE. Identical pre-divergence assets collapse into single B2 objects underassets/{sha[:2]}/{sha[2:4]}/{sha}, reducing storage costs across N parallel world forks from O(N) to O(1). - Presigned Private Serving: Media objects are secured in a private B2 bucket and served via time-limited presigned URLs with origin-scoped CORS rules.
Genblaze SDK Pipeline Integration
The generative pipeline wraps local diffusion models into Genblaze SyncProvider instances:
- Every image and video is generated as a Genblaze
Assetbound to aManifest. - Simulation state properties (
simulation.fork_id,simulation.divergence_date,simulation.sim_date,simulation.real_world_data_cutoff,simulation.is_counterfactual) are injected intoRun.metadata. - Genblaze binds these fields directly into the asset's canonical SHA-256 hash. Running
genblaze verifyon downloaded assets re-derives the cryptographic hash, proving the file has not been altered or tampered with.
Challenges we ran into
- Cryptographic Provenance Invariance: Enforcing that counterfactual simulation assets maintain immutable proof of their non-real-world origin. We engineered custom Genblaze pipeline metadata extractors that bind
real_world_data_cutoffinto the binary MP4 container metadata viaMp4Handler. - Typography Precision in Generative Layouts: Raw diffusion models fail at rendering legible text. We decoupled visual art generation (SDXL-Turbo) from layout assembly, executing vector composition for mastheads, chyrons, watermarks, and burned-in subtitles via Pillow and
ffmpeg. - Sandbox Network Isolation: Orchestrating fallback synthetic briefs and local asset bundling to ensure 100% offline generation resilience when cloud endpoints or external APIs are unreachable.
Accomplishments that we're proud of
- Strict Rubric Alignment: Built a fully operational, production-ready generative media application leveraging Backblaze B2 and the Genblaze SDK.
- Zero Database Schema Changes for Media: Zero Postgres schema bloat (
git diffonsupabase/is empty); all media state is managed via Backblaze B2 indices. - Verified SHA-256 Asset Integrity: 100% of generated newspapers and TV broadcasts pass
genblaze verifywith verifiedsimulation.*provenance metadata. - High-Performance Web Client: Smooth 60fps WebGL rendering across 249 countries with instant Lightbox image inspection and custom TV news broadcast playback.
What we learned
- Genblaze SDK Orchestration: Genblaze provides a robust, provider-agnostic abstraction layer for unifying multi-modal generative models (Image, Text, Audio, Video) into verifiable pipeline assets.
- B2 as a High-Throughput Media Plane: Object storage on Backblaze B2 can completely replace relational database tables for asset indexing and streaming, dramatically improving application scalability.
- Agentic Geopolitical Simulation: Grounding LLM agent prompts with empirical macro-economic data produces nuanced, realistic counterfactual policy narratives.
What's next for RealityShift
- Multi-Player Counterfactual Wargaming: Live multi-player session rooms where human players command rival superpower nations against AI agents.
- C2PA Standard Header Export: Extend Genblaze manifest output to export standardized C2PA metadata manifests for open web browser extension validation.
- Cloud Video Acceleration via GMI Cloud: Scale video broadcast generation by deploying FLUX and AnimateDiff pipelines on GMI Cloud GPU infrastructure.
Technical Specifications & Provider Matrix
| Provider / Tool | Model / Version | Modality | Role |
|---|---|---|---|
| Backblaze B2 | S3-Compatible API | Storage | Primary media plane, presigned asset delivery, per-fork media index |
| Genblaze SDK | genblaze 0.4.5 / genblaze-core 0.3.8 / genblaze-s3 0.3.6 |
SDK / Orchestration | Provenance manifest binding, canonical SHA-256 hashing, asset lifecycle |
| Local Diffusion | SDXL-Turbo (stabilityai/sdxl-turbo) |
Image | Editorial illustrations & news broadcast b-roll stills |
| macOS Speech | say System Synthesizer |
Audio (TTS) | Synthetic news anchor voiceover audio generation |
| Groq API | Llama 3.3 70B (llama-3.3-70b-versatile) |
Text / LLM | Country agent decision logic, divergence narrative generation, broadcast scripting |
| Pillow & ffmpeg | Pillow 10.x / ffmpeg 6.x | Vector / Video Compositing | Newspaper layout compositing, Ken Burns pan/zoom, A/V muxing, subtitling |
| World Bank API | Rest API | Data | Macroeconomic indicator baseline seeding across 249 nations |
Built With
- blackblaze
- genblaze
- llama
- python
Log in or sign up for Devpost to join the conversation.