InsightFlow: Serverless AI Analytics Agent

Published:

Technologies: Cloudflare Workers, D1 (SQLite), Llama 3, TypeScript

View on GitHub

Description

  • Serverless Architecture: Architected a full-stack AI agent entirely on Cloudflare Workers, utilizing D1 (SQLite) for edge storage to process sales data with <50ms cold starts.
  • Text-to-SQL Engine: Integrated Llama 3-8b via Workers AI to translate natural language questions (e.g., “Top 3 products by revenue”) into valid SQL queries with 92% accuracy.
  • Predictive Analytics: Engineered a custom Linear Regression algorithm from scratch in TypeScript (Least Squares method) to generate real-time revenue forecasts, eliminating dependencies on external Python ML libraries.