Inspiration
"Which customers bought the most last month?"—but you need to know SQL, understand table relationships, and figure out how joins work. I thought: what if you could just ask? That's where this started. I wanted to build something that made databases feel conversational, where anyone could explore data by just typing what they wanted to know.
What it does
Insights Agent is an AI-powered analytics platform that lets you chat with your database in plain English. Behind the scenes, it uses Google's Gemini AI to understand your questions, generate SQL queries, and return visual answers—complete with interactive ER diagrams and automated workflows.
The architecture uses a multi-agent system where a coordinator routes questions to specialized agents: one handles SQL queries, another generates schema visualizations, and workflow agents tackle complex multi-step analysis like detecting order anomalies or profiling customer behavior. It's all wrapped in a React frontend talking to a FastAPI backend, deployed on Google Cloud Run.
How we built it
Frontend: Built with React and Vite, featuring real-time chat interfaces, interactive ER diagram visualization using React Flow, and workflow execution dashboards. Used TailwindCSS for responsive design.
Backend: FastAPI server with Google's ADK (AI Development Kit) orchestrating multiple Gemini AI agents. Built custom PostgreSQL introspection tools that let agents dynamically understand any database schema at runtime.
AI Architecture: a coordinator agent (Gemini 2.5 Pro) that routes requests to specialized sub-agents—SQL Agent for queries, Schema Agent for visualization, and Workflow Agents for complex analysis. Each agent has carefully crafted instructions and structured outputs.
Deployment: Multi-stage Docker build with nginx as a reverse proxy.
Challenges we ran into
Dynamic Schema Problem: Making this work with any database (not just my test schema) required building tools that introspect PostgreSQL schemas dynamically—tables, columns, relationships, all at runtime.
Accomplishments that we're proud of
The ER diagram visualization turned out better than expected.
But what makes me happiest? I removed a barrier. You don't need to be a data engineer to explore your database anymore. Just ask your question like you're talking to a colleague, and the AI handles the complexity.
What we learned
I have worked with Google's ADK before but a single agent, and working with multiple AI agent setup was great experience.
What's next for Insights Agent
Multi-Database Support: Extend beyond PostgreSQL to MySQL, MongoDB, and other databases.
Collaborative Features: Allow teams to save, share, and comment on queries and visualizations. Build a shared knowledge base of common analytical patterns.
Advanced Workflows: Add more specialized workflow agents for specific domains
Smart Caching: Implement intelligent schema result caching and incremental updates.
Built With
- cloud-run
- google-adk
- postgresql
- python
- react
Log in or sign up for Devpost to join the conversation.