Skip to content

Latest commit

Β 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Worldcast 🌍

Point at a live world event. Get a simulation of what happens next. Get notified when it comes true.

Worldcast bridges two open-source projects β€” a real-time global intelligence dashboard and a multi-agent AI simulation engine β€” into a single tool that predicts the downstream effects of real-world events, then watches the news to tell you when those predictions actually happen.

License: AGPL-3.0 Node.js Mock-mode quickstart


Demo

Worldcast demo loop: pick a Turkey earthquake event, watch the prediction render, then see a confirming news item flip the watch signal green

The full loop: pick a live event β†’ simulated prediction renders with markets / geopolitics / supply-chain bullets and watch signals β†’ an incoming news event confirms one of those signals and a banner appears at the top. Runs against the included mocks, no Docker required β€” try it in 2 minutes ↓.


What it does

  1. Monitor β€” WorldMonitor aggregates 435+ live news feeds, geopolitical signals, and financial data onto a real-time 3D globe
  2. Select β€” Pick any event, click "Predict this event"
  3. Simulate β€” MiroFish spawns thousands of AI agents with memory and personality, runs a social simulation seeded by that event
  4. Report β€” Plain-English bullets across markets, geopolitics, supply chain β€” plus a checklist of specific verifiable signals to watch for
  5. Notify β€” The bridge continuously scans incoming WorldMonitor events against your open watch signals. When reality matches a prediction, you get a browser notification
Live event β†’ Simulate β†’ Report + Watch signals
                                      ↓
              New events β†’ Matcher β†’ πŸ”” "Your prediction came true"

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                        YOUR UI  :3333                            β”‚
β”‚   Feed Tab β”‚ Globe Tab (iframe) β”‚ Sim Tab (iframe) β”‚ History Tab β”‚
β”‚                                                                  β”‚
β”‚   Report Panel               Watch Signals Panel                 β”‚
β”‚   ──────────────             ─────────────────────────           β”‚
β”‚   β€’ markets                  β–‘ TSMC drops >3% Β· 5 days    πŸ””    β”‚
β”‚   β€’ geopolitics              β–‘ China counter-tariffs Β· 90d πŸ””   β”‚
β”‚   β€’ supply chain             β–‘ Vietnam FDI spike Β· Q3     πŸ””    β”‚
β”‚                              [ βœ“ happened ] [ βœ— didn't ]        β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚ POST /predict                     β”‚ WS: progress, report,
       β”‚                                   β”‚     match alerts πŸ””
       β–Ό                                   β”‚
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                       BRIDGE  :4000                              β”‚
β”‚                                                                  β”‚
β”‚  formatter.js  ── shapes WM event β†’ MF seed                      β”‚
β”‚  jobs.js       ── fires sim, polls status, streams progress      β”‚
β”‚  summarizer.js ── raw MF report β†’ plain English + signals        β”‚
β”‚  watchlist.js  ── stores open signals, expiry, match rules       β”‚
β”‚  matcher.js    ── NEW: polls WM feed, scores against signals     β”‚
β”‚  notifier.js   ── NEW: pushes WS alert when match found          β”‚
β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
       β”‚                                    β”‚
       β–Ό                                    β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  WorldMonitor   β”‚               β”‚      MiroFish       β”‚
β”‚    :5173        │◄─ matcher     β”‚   :5001 / :3000     β”‚
β”‚  (Docker image) β”‚   polls       β”‚   (Docker image)    β”‚
β”‚                 β”‚   every 60s   β”‚                     β”‚
β”‚  GET /api/eventsβ”‚               β”‚  POST /api/simulate β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                                             β”‚
                                  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                                  β”‚      LLM API        β”‚
                                  β”‚  qwen / ollama      β”‚
                                  β”‚  (user's own key)   β”‚
                                  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

You only write and maintain:

  • bridge/ β€” ~250 lines Node.js (6 small modules)
  • ui/ β€” ~180 lines HTML (single file)

WorldMonitor and MiroFish run as Docker images pulled from their registries. You never touch their code. When they update: docker compose pull.


How the notification loop works

Every 60 seconds:
  matcher.js polls WorldMonitor GET /api/events (last 60s of news)
      β”‚
      β–Ό
  For each open watch signal in watchlist:
      score = LLM.match(incoming_event, signal_text)
      if score > 0.8 β†’ signal.status = "confirmed"
                    β†’ notifier.push(WS alert to UI)
                    β†’ UI shows πŸ”” banner + marks checkbox green
      if signal.expires_at < now β†’ signal.status = "expired"

The matcher uses a lightweight LLM call β€” just semantic similarity between the incoming headline and the watch signal text. Cheap, fast, runs every minute.


The watch signals feature

Every prediction report ends with 3–5 specific, verifiable, time-bound signals:

WATCH FOR THESE SIGNALS                status
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
β–‘  TSMC stock drops >3%                watching Β· expires 5 days
β–‘  China announces counter-tariffs     watching Β· expires 90 days
β–‘  Vietnam FDI announcements spike     watching Β· expires Q3
β–‘  CHIPS Act discussion resurfaces     watching Β· expires Q2

Last scanned: 2 min ago

When a match fires:

πŸ””  PREDICTION CONFIRMED
    "China announces agricultural counter-tariffs"
    matched incoming:
    "Beijing announces retaliatory tariffs on US soybeans" Β· Reuters Β· 14 min ago

    [ view event ]  [ view original prediction ]

Quick start β€” see it running in 2 minutes

The fastest way to try Worldcast is mock mode: the bridge + UI talk to a local stub of WorldMonitor and MiroFish, so you don't need Docker, the real upstream images, a Zep Cloud account, or an LLM key beyond a local Ollama.

Requirements: Node.js 18+ and (optionally) Ollama with any small model pulled (ollama pull llama3). If Ollama isn't running, predictions just return empty summaries β€” everything else still works.

git clone https://github.com/wilson-cheng1110/WorldPredict
cd WorldPredict
cp .env.example .env            # default values are fine for mock mode
npm install                      # installs bridge + test deps (~2 min)
npm run quickstart               # boots mocks, bridge, UI all at once

Open http://localhost:3333. You'll see three sample events. Click "Predict this event" on any of them β€” the progress bar runs through queued β†’ building world model β†’ summarizing β†’ complete, then a report panel appears with Markets / Geopolitics / Supply Chain bullets and a checklist of watch signals.

To watch the notification loop fire, inject a confirming event into the mock WM:

curl -X POST http://localhost:5173/inject -H "Content-Type: application/json" -d '{
  "id":"wm_demo","title":"Confirming event matches your signal",
  "description":"...","source":"Demo","published_at":"2026-05-11T00:00:00Z",
  "region":"TEST","category":"markets","url":"https://example.com"
}'

Within 60 seconds the matcher cycle picks it up and you get a browser notification.

Ctrl-C in the quickstart terminal tears everything down.

Tests

npm test                    # unit tests + MF-direct tests (fast, <10s)
npm run test:integration    # full loop against the running mock stack

Real-stack mode (advanced)

Running against the actual WorldMonitor and MiroFish containers is not yet a one-command experience. The Docker images aren't published on a public registry, so you'd need to:

  1. Clone koala73/worldmonitor and 666ghj/MiroFish as siblings of this repo and build them locally
  2. Get a free Zep Cloud API key (MiroFish requires it for graph + simulation steps)
  3. Adjust docker-compose.yml to build: ../worldmonitor / build: ../MiroFish/backend instead of image:
  4. Get an LLM key β€” Alibaba Bailian qwen-plus is free tier; OpenAI also works

See ROADMAP.md for the state of real-stack support.


Environment variables

# LLM β€” any OpenAI-compatible API
LLM_API_KEY=your_key
LLM_BASE_URL=https://dashscope.aliyuncs.com/compatible-mode/v1
LLM_MODEL_NAME=qwen-plus

# Zep Cloud β€” agent long-term memory
ZEP_API_KEY=your_zep_key

# Bridge internals (defaults work, change if needed)
BRIDGE_PORT=4000
WM_URL=http://worldmonitor:5173
MF_API_URL=http://mirofish-api:5001
MF_UI_URL=http://mirofish-ui:3000
MATCH_POLL_INTERVAL_MS=60000
MATCH_CONFIDENCE_THRESHOLD=0.8
SIGNAL_DEFAULT_EXPIRY_DAYS=90

Project structure

worldcast/
β”œβ”€β”€ package.json             root npm scripts (quickstart, test)
β”œβ”€β”€ docker-compose.yml       real-stack composition (see ROADMAP.md)
β”œβ”€β”€ .env.example             all keys documented
β”œβ”€β”€ scripts/
β”‚   └── quickstart.mjs       boots mocks + bridge + UI in one process
β”œβ”€β”€ bridge/
β”‚   β”œβ”€β”€ index.js             Express + WebSocket server
β”‚   β”œβ”€β”€ formatter.js         WM event β†’ MF seed document
β”‚   β”œβ”€β”€ jobs.js              fire sim, poll, stream progress
β”‚   β”œβ”€β”€ summarizer.js        raw report β†’ bullets + watch signals
β”‚   β”œβ”€β”€ watchlist.js         store/retrieve open signals
β”‚   β”œβ”€β”€ matcher.js           poll WM feed, score vs signals
β”‚   └── notifier.js          push WS alerts to UI clients
β”œβ”€β”€ ui/
β”‚   └── index.html           all 4 tabs + notification UI
β”œβ”€β”€ test/
β”‚   β”œβ”€β”€ mock-services.js     stub WorldMonitor + MiroFish
β”‚   β”œβ”€β”€ unit.test.js         node:test, pure-function coverage
β”‚   β”œβ”€β”€ mf-direct.test.js    contract test against mock MF
β”‚   └── integration.test.js  POST /predict β†’ WS β†’ signal_confirmed
└── docs/
    β”œβ”€β”€ index.html           GitHub Pages landing page
    └── screenshots/         README assets

Limitations

  • Predictions are probabilistic narratives, not statistical forecasts. Scenario planning, not financial advice.
  • Simulation quality scales with seed richness. Sparse events β†’ weaker simulations.
  • Each simulation takes 5–15 min and consumes significant LLM tokens. Start with <40 rounds.
  • The matcher uses semantic similarity, not fact verification. A matching headline signals confirmation β€” human judgement still needed.

License

AGPL-3.0 β€” free to use, modify, distribute. Keep it open source.

WorldMonitor Β© Elie Habib β€” AGPL-3.0 MiroFish Β© 666ghj / Shanda Group β€” AGPL-3.0

About

Bridge WorldMonitor (live news/intelligence globe) and MiroFish (multi-agent prediction engine) into a single self-hosted tool: pick a real event, simulate downstream effects, get notified when reality matches the prediction.

Topics

Resources

Code of conduct

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages