All-Seeing Eye

Central AI Orchestration & Unified Intelligence Layer

System Overview

The All-Seeing Eye is the central nervous system of Agencio Predict, aggregating data from 15+ source categories into a unified intelligence layer that powers insights, alerts, and trading decisions.

15
Data Source Categories
87
Scheduler Jobs
5min
Aggregation Cycle
436
DSL Primitives

Core Capabilities

Data Flow Pipeline

The All-Seeing Eye orchestrator runs on a 5-minute cycle, aggregating all data sources and generating insights.

flowchart TB subgraph Sources["Data Sources (15 Categories)"] M[Market Data
Yahoo, CoinGecko, Finnhub] P[Prediction Markets
Polymarket, Kalshi, Metaculus] S[Sentiment
Reddit, Twitter, News] D[Derivatives
VIX, Funding, OI] I[Institutional
SEC 13F Holdings] A[Activist
SEC 13D/13G] O[Options Flow
Polygon.io] W[Wallet Clustering
Polymarket Fraud] R[Resilience
Crisis Scoring] SC[Supply Chain
Company Relations] PA[Price Action
Patterns, FVG] AL[Algorithms
Performance] AI[AI Predictions
Internal Models] MK[Marketing
Ad Signals] TR[Trust Layer
Whale/Bot Detection] end subgraph Aggregator["All-Seeing Eye Aggregator"] AGG[aggregateAllData
Parallel Fetch] NORM[Normalize to
UnifiedDataPoint] CORR[Correlation
Matrix] end subgraph Intelligence["Intelligence Layer"] INS[Insight
Generator] BS[Black Swan
Detector] ACT[Action
Generator] end subgraph Consumers["Consumers"] EXEC[Executor
Live Run Kill] DSL[DSL Primitives
Algorithm Builder] UI[Dashboard
Alerts & Insights] SSE[SSE Stream
Real-time Updates] end M --> AGG P --> AGG S --> AGG D --> AGG I --> AGG A --> AGG O --> AGG W --> AGG R --> AGG SC --> AGG PA --> AGG AL --> AGG AI --> AGG MK --> AGG TR --> AGG AGG --> NORM NORM --> CORR CORR --> INS CORR --> BS INS --> ACT BS --> EXEC INS --> DSL ACT --> UI INS --> SSE style AGG fill:#22d3ee,color:#000 style BS fill:#f85149,color:#fff style EXEC fill:#f0883e,color:#000

Data Source Categories

Each source category provides UnifiedDataPoint objects with normalized values, confidence scores, and metadata.

Category Sources Refresh Rate Key Signals
Market Yahoo, CoinGecko, Finnhub, Frankfurter 15 min Price, volume, momentum
Prediction Polymarket, Kalshi, Metaculus, PredictIt 15 min Event probabilities, market consensus
Sentiment Reddit, Twitter, Telegram, Discord, News 15 min Social sentiment, trending topics
Derivatives CBOE VIX, Fear/Greed, Binance, Coinglass 5 min VIX, funding rates, open interest
Institutional SEC EDGAR 13F Weekly Ownership %, position changes
Activist SEC EDGAR 13D/13G Daily Activist positions, campaigns
Options Flow Polygon.io 5 min Put/call ratio, unusual activity
Wallet Clustering Polymarket CLOB 6 hours Fraud detection, manipulation signals
Resilience Historical crisis data Weekly Crisis performance, defensive scores
Supply Chain FactSet, Finnhub Weekly Customer/supplier relationships
Price Action Internal pattern detection Real-time FVG, candlestick patterns, S/R
Algorithms Internal performance tracking Per tick Strategy performance metrics
AI Predictions PINN, LSTM, XGBoost models Daily Price forecasts, regime predictions
Marketing Google, Meta, TikTok, LinkedIn Hourly Ad performance signals
Trust Whale/bot classification 15 min VPIN, Kyle's Lambda, bot signatures

Data Aggregation

The aggregateAllData() function performs parallel fetches from all source categories and normalizes data to UnifiedDataPoint format.

flowchart LR subgraph Input["Raw Data"] R1[VIX: 18.5] R2[BTC Funding: 0.01%] R3[Reddit Sentiment: 0.7] R4[P/C Ratio: 1.2] end subgraph Normalize["Normalize to -1 to +1"] N1[VIX: +0.1
Slightly elevated] N2[Funding: -0.2
Bearish] N3[Sentiment: +0.4
Bullish] N4[P/C: +0.2
Put heavy] end subgraph Unified["UnifiedDataPoint"] U[sourceId: string
sourceName: string
sourceType: string
normalizedValue: number
rawValue: number
direction: up/down/flat
momentum: number
confidence: number
qualityScore: number
timestamp: string
metadata: object] end R1 --> N1 R2 --> N2 R3 --> N3 R4 --> N4 N1 --> U N2 --> U N3 --> U N4 --> U

AggregatedData Structure

Field Type Description
marketUnifiedDataPoint[]Market data signals
predictionUnifiedDataPoint[]Prediction market signals
sentimentUnifiedDataPoint[]Social sentiment signals
derivativesUnifiedDataPoint[]Derivatives market signals
institutionalUnifiedDataPoint[]13F institutional holdings
activistUnifiedDataPoint[]13D/13G activist positions
optionsFlowUnifiedDataPoint[]Options unusual activity
walletClusteringUnifiedDataPoint[]Polymarket fraud signals
resilienceUnifiedDataPoint[]Crisis resilience scores
supplyChainUnifiedDataPoint[]Company relationships
priceActionUnifiedDataPoint[]Pattern detection
algorithmsUnifiedDataPoint[]Strategy performance
aiUnifiedDataPoint[]AI model predictions
marketingUnifiedDataPoint[]Ad platform signals
trustUnifiedDataPoint[]Whale/bot classification
allUnifiedDataPoint[]Combined array of all sources
statsobjecttotalDataPoints, avgConfidence, avgQuality

Executor Integration

The All-Seeing Eye's black swan detection is directly wired to the trading executor. When a high-severity warning is detected, all live runs are automatically halted.

sequenceDiagram participant E as Executor tickRun() participant ASE as All-Seeing Eye participant BS as Black Swan Detector participant DB as Database E->>ASE: listActiveWarnings() ASE->>BS: Check warnings cache BS-->>ASE: Active warnings list alt High+ severity warning exists ASE-->>E: Warning (severity: high/severe/extreme) E->>DB: Record guardrail kill E->>DB: Update run ended_at, kill_reason E->>E: Return killed:L1:black_swan else No severe warnings ASE-->>E: Empty or low-severity warnings E->>E: Continue normal tick processing end

Kill Switch Hierarchy

The executor checks multiple kill conditions before processing each tick:

  1. 1
    Platform AI Kill Switch — Admin-triggered emergency stop for all AI trading
  2. 2
    Black Swan Warning — Automatic halt when All-Seeing Eye detects high+ severity warning
  3. 3
    Broker Credentials — Kill if broker credentials are missing during live run
  4. 4
    Position Reconciliation — Kill if broker positions don't match internal state
  5. 5
    L1/L2/L3 Guardrails — Strategy-specific risk limits

Scheduler Jobs

87 scheduler jobs feed data into the All-Seeing Eye. Key jobs related to the intelligence layer:

Job Name Interval Description
all-seeing-eye-orchestrator 5 min Main aggregation cycle
sync-polymarket-bets 6 hours Fetch CLOB trades for wallet clustering
wallet-clustering-incremental Daily Analyze recently active wallets
sync-13f-incremental Weekly Fetch SEC 13F filings
sync-activist-filings Daily Fetch SEC 13D/13G filings
sync-resilience-scores Weekly Compute crisis resilience scores
human-automation 15 min Divergence engine + composite score
sentiment-rollup 15 min Aggregate social sentiment

Key Files

File Purpose
packages/be/src/all-seeing-eye/index.tsMain module exports
packages/be/src/all-seeing-eye/orchestrator/index.tsOrchestrator (start, stop, runCycle)
packages/be/src/all-seeing-eye/aggregation/index.tsData aggregation (aggregateAllData)
packages/be/src/all-seeing-eye/aggregation/options-flow.tsOptions flow bridge
packages/be/src/all-seeing-eye/black-swan/detector.tsBlack swan detection
packages/be/src/all-seeing-eye/insights/index.tsInsight generation
packages/be/src/all-seeing-eye/actions/index.tsAction generation
packages/be/src/scheduler/index.tsScheduler job registration