CORTEX v2 - On-board AI
7-layer AI system that monitors, learns your optimal model mix, enforces sovereignty, and lets you chat about your own data.
CORTEX v2 is HiWay's autonomous intelligence layer. It's not a dashboard you watch - it's a multi-agent system that runs in the background, detects anomalies, surfaces insights, adjusts routing parameters, learns your optimal model mix per task type, and enforces data-sovereignty compliance. Everything surfaces through the CORTEX Inbox in your dashboard.
The 7 layers
| Layer | Frequency | Model | Role |
|---|---|---|---|
| Guardian Triage | Every Guardian event | Haiku 4.5 | Classifies severity (info / warning / critical) and decides whether to notify immediately or batch. Filters noise. |
| Workspace Intelligence | Every 24h | Haiku 4.5 | Audits routing decisions, detects heavy-tier creep, provider cost drift, and cache hit regression. |
| Strategic Advisor | Every 7 days | Sonnet 4.6 | Weekly strategic report: spending trends, routing efficiency score, peer percentile comparison, top 3 actionable recommendations. |
| Self-Tuning Engine | After each Strategic report | Haiku 4.5 + Sonnet 4.6 | Proposes concrete parameter changes (Guardian sensitivity, routing thresholds) with rollback support. Applies or asks approval. |
| Network Intelligence | Weekly (cross-workspace) | Sonnet 4.6 | Detects fleet-wide patterns: emerging model quality issues, provider outage precursors, cost anomalies across opted-in workspaces. |
| Mix Optimizer + LLM Judge | Weekly optimizer · 10% sampled judge | Haiku (your Anthropic key) | Scores every observed (workspace, model, task_type) triple. 10% of responses judged by Haiku for real output quality. Writes a per-workspace routing config applied to all future 'auto' requests. Judge cost billed to your Anthropic key (~$0.00084/call). |
| Sovereignty Guard | Every routing decision | - (hard filter) | Enforces the workspace sovereignty_zone (global / eu / fr / strict). Only models with matching data residency are eligible - GDPR, DORA, NIS2, HDS baked in as a constraint, not a suggestion. |
Mix Optimizer + LLM Judge - how it works
Every Sunday at 22:00 UTC the Mix Optimizer queries 30 days of usage_events per task_type (code / reasoning / creative / tool_use / chat). For each observed model it computes a composite score: w_quality × quality_proxy − w_cost × norm_cost − w_latency × norm_p95. The weights come from your router profile (savings / balanced / quality_first / agent / batch). Result: a routing config written to workspace_routing_config and Redis. From the next request, routing to model="auto" uses your workspace-specific learned config - not the generic tier default. Requires ≥ 100 requests in the last 30 days to activate.
quality_proxy formula (C8): 1 − error_rate − 0.3 × retry_rate + 0.3 × judge_score. The judge_score comes from the LLM Judge: 10% of responses are scored 1-10 by claude-haiku-4-5 on accuracy, completeness, and relevance, then normalised to 0-1. The call uses your own Anthropic BYOK key - cost is ~$0.00084/judged call and appears in CORTEX costs on your dashboard. When no judge data is available, the formula falls back to the user_feedback signal (thumbs up/down). Models with only HTTP success but poor response quality now score lower than genuinely good models.
LLM Judge sampling
Sampling is deterministic (SHA-256 hash of request_id), so the same request always maps to the same judge/no-judge decision across retries. Default rate: 10%. Configurable via CORTEX_JUDGE_SAMPLING_RATE env var (0.0-1.0). Set to 0 to disable.
Sovereignty as a hard filter
Set sovereignty_zone in Settings → CORTEX → Compliance. Options: global (no restriction), eu (EU data residency), fr (France only), strict (FR with specific certifications). Models that don't satisfy the zone never enter scoring. This is a hard constraint - not a score penalty.
The CORTEX Inbox
Each agent deposits insights in the Inbox as actionable cards: a daily digest, a weekly strategic report, and immediate alerts for critical events. You can apply a recommendation in one click or dismiss it - everything is versioned with rollback.
Opt-in for Network Intelligence
The network agent analyses cross-workspace patterns on opted-in workspaces only. Toggle your participation in Settings → CORTEX → Data sharing. No prompt data is shared - only aggregated metadata (tier distribution, error rates, latencies).
CORTEX on Scale & Enterprise
All 7 CORTEX layers are active from the Scale plan. Enterprise adds Market Intelligence (new model alerts via Perplexity), CORTEX Chatbot on your workspace data, and a dedicated SLA on critical alerts.