Shadow Warden AI Shadow Warden
AI Analytics Hub
Shadow Warden AI
Shadow Warden AI
Headless BI · v6.8

AI Analytics Hub

One API. Nine semantic models. Every dashboard, every AI agent, every external BI tool queries through a single deterministic SQL interface — so changing a metric definition updates every surface instantly.

9
Semantic Models
10 min
Redis Cache TTL
< 2 ms
SQL Generation
Pro+
Tier Required

How It Works

1
Consumer
SOC Dashboard · Streamlit · Portal · SOVA · External BI
2
Query Intent
Natural language or structured QueryObject
3
Semantic Layer API
POST /semantic-layer/query · /query/intent · /models/catalog
4
Engine + Cache
Deterministic SQL · AccessRules · Redis 10 min TTL
5
Data Source
PostgreSQL + TimescaleDB · ai_spend · filter_log · …

LLM (Claude Haiku) translates natural language → QueryObject → deterministic SQL — no hallucinated numbers, no raw DB access exposed.

9 Built-in Models

All models available immediately on Pro+. Expand any model with custom metrics via the Self-Service Catalog.

🛡️

Filter Events

filter_events

Security

Block rate, P99 latency, verdict distribution across the 15-layer pipeline.

7 metrics · tenant-isolated

Entity Risk Scores

ers_scores

Security

Session risk scores, shadow-ban events, high-risk session count.

4 metrics · tenant-isolated
🔥

Security Incidents

incidents

Security

STIX-linked incident journal — severity, status, avg resolution time.

5 metrics · tenant-isolated
📊

Billing & Quota

billing_usage

Revenue

Requests consumed, cost, quota utilisation, overage charges.

4 metrics · tenant-isolated
💰

AI Cost Allocation

ai_spend

Revenue

Per-department AI spend vs budget — the source of truth for Budget Guardian.

4 metrics · tenant-isolated
🛒

Agentic Commerce Orders

agentic_orders

Commerce

Purchases by AI agents: spend by merchant, protocol (UCP/AP2/MCP), status.

5 metrics · tenant-isolated
📋

Vendor Contracts & DPA

vendor_contracts

Governance

DPA expiry countdown, risk tiers, active vs pending vendor contracts.

4 metrics · tenant-isolated

Compliance & Training

compliance_attestations

Compliance

Employee AI training completion %, overdue renewals by department.

4 metrics · tenant-isolated
🌐

Sovereign Tunnel Sessions

tunnel_sessions

Sovereignty

MASQUE tunnel compliance rate per jurisdiction — EU, US, UK, CA and more.

4 metrics · tenant-isolated

Three Pillars

💰

Commerce Budget Guardian

  • Reads actual MTD spend from ai_spend model
  • Per-transaction limit enforcement
  • Monthly budget ceiling check
  • Approval gate for large purchases
  • Slack alert when budget exceeded
GET /business-community/commerce/budget
🗂️

Self-Service Catalog

  • Register custom models via API or Streamlit
  • Persisted to SQLite, hot-loaded instantly
  • Access rules enforce tenant isolation
  • OSI 1.0 export/import for external BI
  • SOVA can discover and query any model
POST /semantic-layer/models/catalog
🤖

SOVA AI Tools (74 total)

  • semantic_query() — NL or structured QueryObject
  • list_semantic_models() — discover available models
  • check_commerce_budget() — pre-flight payment check
  • get_spend_summary() — MTD spend report
  • #70-74: write_handoff_memory, read_handoff_memory, semantic_listing_search, get_protocol_schema, send_order_proposal
Via SOVA agent tool dispatch

Query Example

Structured API call

POST /semantic-layer/query
{
  "model_id": "ai_spend",
  "metrics":  ["total_cost_usd"],
  "dimensions": ["department"],
  "filters": [{
    "dimension": "tenant_id",
    "operator": "=",
    "value": "your-tenant"
  }],
  "limit": 100
}

Generated SQL (deterministic)

SELECT
    department AS department,
    SUM(amount_usd) AS total_cost_usd
FROM cost_allocation_entries
WHERE (tenant_id = %s)
GROUP BY department
LIMIT 100

The same query works for SOVA agents, SOC Dashboard, Streamlit, external BI — and results are Redis-cached for 10 minutes. SQL never reaches the LLM; only metric names and descriptions are in the prompt.

Marketplace Revenue Analytics
Track x402 earnings, take-rate deductions, and seller net in real time
ai_spend model
Two revenue streams tracked automatically
x402 nanopayments
$0.000001/call · aggregate per billing cycle
metered
Take rate (1.5% GMV)
Deducted at ClearingEngine · Decimal ROUND_HALF_UP
per trade
Sponsored listing boost
$29/mo · +0.15 pgvector similarity · optional
add-on
Query via Semantic Layer
POST /semantic-layer/query ai_spend model
-- Month-to-date seller net earnings
SELECT
  seller_agent_id,
  SUM(gmv_usd)           AS gross_revenue,
  SUM(platform_fee_usd)  AS take_rate_paid,
  SUM(seller_net_usd)    AS net_profit
FROM agentic_orders
WHERE cleared_at >= date_trunc('month', now())
GROUP BY seller_agent_id
ORDER BY net_profit DESC;
Open ROI Estimator

Ready to centralise your analytics?

AI Analytics Hub is available on the Pro plan ($69/mo). Register custom models, query with natural language, and share OSI models with your community — all from a single API.