Project
SAGE
Smart Agentic Governance Engine
Smart Agentic Governance Engine — An enterprise email intelligence platform that processes 1,000+ mailboxes through AI-powered analysis, turning raw communications into actionable business insights with zero cloud AI costs.
Pipeline Architecture
Click any node to explore details. 67 components, 2 parallel pipelines, 3 AI agents.
The company had been in business for 35 years and had never seen an AI system. Hundreds of employees, mountains of paper, and decades of processes built for a world that moved on. The brief wasn't 'build AI.' The brief was 'make this work better.' AI happened to be the answer.
SAGE is a full-stack enterprise intelligence platform built to process the overwhelming volume of corporate email. Handling over 70,000 emails per day across 1,000+ mailboxes, it transforms raw communications into structured, actionable business insights through a dual-pipeline architecture: 67 components across 2 parallel pipelines, 3 AI agents, and 2,161 Convex functions powering the backend.
The Email Intelligence Pipeline starts with over 200 exclusion rules, developed through extensive analysis, that eliminate 70% of noise before any processing begins. Three specialized AI agents then work in sequence: an Extraction Agent identifies entities and relationships, an Analysis Agent powered by a custom fine-tuned 8.9B parameter model performs conversation-level intelligence, and a Reviewer Agent validates every output before it reaches decision-makers.
Running in parallel, the HR Data Hub automatically syncs employee records from Microsoft Graph, cleans and normalizes the data, and constructs the organizational hierarchy. This living org structure powers intelligent routing, ensuring analyzed communications reach the right department heads without manual intervention.
The entire system runs on a dedicated Mac Studio via Docker, with Convex self-hosted on PostgreSQL 17 as the complete backend. The AI stack uses Ollama for local inference with Z.AI as a cloud fallback, protected by a circuit breaker pattern. A custom 7-layer reinforced learning memory system continuously improves analysis accuracy across sessions. Zero data leaves the premises and zero cloud AI costs.
Built with 451 React components, 73 custom hooks, and 47 routes, the frontend delivers real-time dashboards rendering at 60fps even with 10,000+ rows via TanStack Virtual. The backend orchestrates 42 cron jobs, parallel work pools, durable workflows, and a self-healing watchdog that monitors system health every 5 minutes.
At its core, SAGE builds lasting institutional intelligence through a 7-layer reinforced learning memory system. Decision Transformer, Q-Learning, Actor-Critic, and four additional algorithms work together to continuously improve analysis accuracy. A vector search engine powered by HNSW graphs with GNN enhancement delivers 12.4% better retrieval, while WASM-powered ONNX embeddings run directly in-browser with zero overhead, enabling semantic understanding of every communication without external API calls.