Foresight Prediction Engine Architecture

Foresight Prediction Engine Architecture An architecture diagram generated by Archify. User · terminal / browser · Architecture component User terminal / browser pi Shell · agent loop · providers · Foresight local runtime (Windows 11) · shell/pi pi Shell agent loop · providers shell/pi foresight-tools · predict / resolve · Foresight local runtime (Windows 11) · .foresight/extensions foresight-tools predict / resolve .foresight/extensions Engine · reason · calibrate · resolve · Foresight local runtime (Windows 11) › Python engine + storage · src/predictor Engine reason · calibrate · resolve src/predictor DuckDB · data/foresight.db · Foresight local runtime (Windows 11) › Python engine + storage · questions · scores · log DuckDB data/foresight.db questions · scores · log LLM Providers · DeepSeek / ARK · Architecture component · llm/client.py LLM Providers DeepSeek / ARK llm/client.py Data Sources · GDELT · Polymarket · Architecture component · data/sources.py Data Sources GDELT · Polymarket data/sources.py Task Scheduler · 6 schtasks · Foresight local runtime (Windows 11) · daily / evolve / health Task Scheduler 6 schtasks daily / evolve / health signsrv · media-crawler signals · Foresight local runtime (Windows 11) · ensure_signsrv.py signsrv media-crawler signals ensure_signsrv.py Web Dashboard · read-only scores · Foresight local runtime (Windows 11) · src/predictor/web Web Dashboard read-only scores src/predictor/web chat / ask tool calls python calls read / write read-only reason / resolve search / quotes ingest corpus cron triggers keep-alive Foresight local runtime (Windows 11) Python engine + storage

Main path

  • • chat → tool bridge → Python engine → DuckDB
  • • daily 09:00 scheduled rounds predict and resolve

Engine capabilities

  • • Isotonic calibration + Brier bucketed scoring
  • • GDELT / NewsAPI / Polymarket multi-source retrieval
  • • multi-provider LLM reasoning and auto-resolution

Operational facts

  • • Windows host · schtasks ×6 · signsrv resident
  • • web dashboard is read-only
  • • DuckDB cross-process exclusive lock, writes serialize