Back to Projects

CASE STUDY & ARCHITECTURE · ENTERPRISE CONVERSATIONAL BI

Superflow Enterprise

Autonomous Enterprise AI Agent for Apache Superset & Telecom Network Analytics — transforming natural-language executive instructions into production multi-chart dashboards, in-place grid mutations, and self-healing visualizations under a strict Zero-Knowledge Data Plane.

Next.js 16 (App Router)
TypeScript
Google Gemini Multi-Model Cascade
Apache Superset REST API
n8n
Multi-Server PostgreSQL
Tailwind CSS
Superflow Enterprise — Autonomous Conversational BI Agent
Zero-Knowledge Data Plane & UU PDP Compliance

Superflow enforces a strict physical separation between the Control Plane (DDL schema metadata, SQL definitions, and Superset JSON layout AST) and the Data Plane (isolated behind corporate VPN). The AI model never receives or stores raw customer records, and destructive SQL verbs (DROP, DELETE, TRUNCATE, ALTER) are blocked at the lexical parser level.

01 — Executive Overview & Problem Statement

Managing telecom network performance analytics across multi-server PostgreSQL clusters (45+ active schemas and 4,792 analytical tables covering 4G/5G radio capacity, CSSR, DCR, competitor benchmarks, and incident tickets) previously required a manual 15 to 30 minute cycle per dashboard request. Analysts had to manually write complex SQL in Superset SQL Lab, register virtual datasets, configure individual chart slices, and drag-and-drop grid layouts.

Furthermore, minor visual revisions in conventional BI workflows caused severe Dashboard Sprawl (hundreds of duplicate dashboards), while schema changes frequently triggered blind Network Error failures. Superflow Enterprise solves this end-to-end: translating natural-language prompts into verified multi-chart Apache Superset dashboards in 1.5–3.5 seconds with live in-place mutation and autonomous self-healing.

02 — Operational Impact (Manual Process vs Superflow Enterprise)

Time-to-Insight

~2.1 Seconds

Down from 15–30 minutes per multi-chart dashboard request (>85% operational time saved).

Fast-Path Router

< 10 ms

In-memory schema & table catalog lookup across 4,792 tables with zero LLM token consumption.

Dashboard Sprawl

0% Duplicates

Isolated in-place mutation via PUT /api/v1/dashboard/<id>.

Dashboard Creation Cycle Time
Before (Manual):15 to 30 minutes per dashboard (Manual SQL Lab + Drag & Drop)
After (Superflow):1.5 to 3.5 seconds end-to-end (Autonomous ReAct Generation)
Chart & Palette Modification
Before (Manual):Create new slice from scratch, delete old chart, rebuild layout
After (Superflow):In-Place Mutation (HTTP PUT) with zero duplicate dashboard sprawl
Grid Sizing & Layout Orchestration
Before (Manual):Manual mouse drag-and-drop inside Superset edit mode
After (Superflow):Natural language ('widen', 'full width') with AST Auto-Reflow Guardrail
Data Dictionary & Schema Lookup
Before (Manual):Search static Excel/Confluence docs or ask a Data Engineer
After (Superflow):Sub-10ms in-memory Fast-Path Catalog Router across 45+ schemas
Customer Data Privacy (UU PDP)
Before (Manual):Risk of sensitive exposure if raw rows are exported to external tools
After (Superflow):Zero-Knowledge Data Plane (AI only sees DDL schema metadata)
Query & Axis Error Recovery
Before (Manual):User must manually debug SQL and Superset form_data parameters
After (Superflow):Autonomous Troubleshooting Engine diagnoses & self-heals chart axes

03 — Core System Architecture & Guardrails

Autonomous ReAct Loop

Thinking → Action → Observation → Verification

Visualized live in the chat UI via AgenticTraceWidget.tsx, coupled with a Strict Anti-Blindness Guardrail that verifies physical Superset API responses before confirming success.

High Availability AI

6-Tier Gemini Multi-Model Cascade

Eliminates rate-limit downtime through automatic tiered fallback across Gemini Flash and Pro model families with session-scoped conversational memory.

Layout AST Engine

Dynamic Grid & Auto-Reflow Guardrail

Manipulates Superset's position_json tree via natural language (“narrow”, “widen”, “full width”), automatically isolating 12-column full-width cards into dedicated rows so adjacent charts never overlap.

Viz Intelligence

Anti-Pattern & Area Bias Mitigation

Prevents Pie/Donut charts on high-cardinality dimensions (>5–7 regions), mitigates Choropleth Map Area Bias via Horizontal Ranked Bar Charts, and supports Confidence Bands, Box Plots, and Treemaps.

04 — Dynamic Tool Dispatcher (11 Integrated Agent Tools)

Registered in src/lib/agentTools.ts to orchestrate live Apache Superset REST APIs and multi-node PostgreSQL introspection:

create_superset_dashboard

Automates virtual dataset registration, multi-chart slice creation, 2x2 grid assembly, and live Apache Superset dashboard publication.

apply_dashboard_advanced_evaluations

Applies advanced statistical visualization transformations concurrently across target dashboards.

troubleshoot_and_fix_chart

Autonomously diagnoses and heals SQL query errors, axis mismatches, and invalid temporal filters on non-timeseries tables.

mutate_dashboard_card_layout

Mutates Superset AST position_json dimensions (1–12 columns) via natural language with an Auto-Reflow Guardrail.

mutate_superset_chart_viz

Performs isolated in-place chart visualization type mutations via HTTP PUT without creating duplicate slices.

mutate_superset_chart_colors

Synchronizes two-layer corporate and semantic color palettes (Telkomsel Corporate, Bright Vibrant, Luxury Jewel Tone).

apply_table_conditional_formatting

Injects dynamic row-level conditional formatting rules (e.g., highlighting Delayed pipeline statuses).

search_superset_assets

Reads directly from live Superset REST API (GET /api/v1/dashboard/) to eliminate 100% of stale catalog hallucinations.

get_schema_tables & execute_sql_query

Inspects schema metadata and executes strictly sanitized read-only SQL probes across multi-server PostgreSQL clusters.

get_dashboard_sources_and_lineage

Traces end-to-end data lineage from upstream PostgreSQL schemas down to individual Superset visualization slices.

get_dashboard_freshness_status

Monitors real-time ETL pipeline freshness and detects delayed data ingestion across production tables.

05 — Engineering Evolution (Sprint 1 — Sprint 9 Roadmap)

Iterative progression from a single-chart generator PoC to a self-healing autonomous conversational BI platform:

Phase 1Foundation, 2x2 Multi-Chart Grid & Corporate Styling

Established workflow orchestration, Gemini LLM + Superset REST API integration, 2x2 complementary multi-chart planning, SQL LIMIT/non-destructive guardrails, and corporate color palettes.

Phase 2Sub-10ms Fast-Path Router & Smart Visual Heuristics

Built an in-memory catalog router answering schema queries in <10ms without LLM token overhead, paired with heuristic chart selection (Time-Series → Line, Categorical → Bar, Low-Cardinality → Donut).

Phase 3In-Place Mutation & Multi-Server Database Integration

Eliminated dashboard duplication via in-place HTTP PUT updates, proactive empty-table detection, and unified multi-server PostgreSQL integration across distributed database clusters.

Phase 4Pure Next.js App Router Migration & ReAct Agentic Trace

Migrated to a native Next.js App Router + TypeScript architecture featuring a transparent ReAct Execution Loop (Thinking, Action, Observation, Verification) and interactive Agentic Trace Widget.

Phase 5Dynamic AST Grid Engine, Viz Intelligence & Self-Healing

Delivered Live Superset Asset Discovery, AST position_json card resizing with Auto-Reflow, Data Visualization Intelligence (mitigating Map Area Bias & Pie anti-patterns), and Autonomous Chart Troubleshooting.

Back to ProjectsSuperflow Enterprise Case Study · Architected by Farrel Zandra