Elevator Pitch
BA-Go is an agentic decision room for micro-dramas. Powered by ClickHouse and Gemini, it transforms real-time streaming metrics into actionable, data-backed operational directives.
Inspiration
The short-form and micro-drama streaming industry operates at an incredibly volatile pace, where viewer drop-offs and ROI fluctuations happen in minutes. While participating in the Agentic Cinema hackathon, we recognized a glaring problem in media enterprise workflows. Studio executives waste hours manually stitching together fragmented reports from AdMob, Google Ads UAC, and application analytics just to figure out why a show is bleeding viewers. We wanted to move beyond passive dashboards and build an active, autonomous Agentic Decision Room that does the heavy lifting for them.
What it does
BA-Go is a unified executive decision dashboard that acts as an AI-powered control room for micro-drama studios. It centralizes fragmented analytics into a single platform.
- Parallel Query Comparison: Users select a baseline and current period. The app issues parallel queries to calculate exact performance deltas in real-time, represented mathematically as:
$$\Delta=\frac{V_{current}-V_{baseline}}{V_{baseline}}\times100$$
- Dynamic Trend Indicators: HTML-styled badges automatically inject across regional scorecards and title leaderboards (Green $\uparrow$ for positive, Red $\downarrow$ for negative).
- Agentic Hypothesis Engine: Executives can type natural language questions (e.g., "Why is Region B underperforming?"). Gemini 2.5 Pro instantly translates this into dynamic SQL, queries the database, and returns concrete operational directives alongside the live SQL trace.
How we built it
We architected the project using the required Google Cloud and partner stack for the hackathon.
- Frontend Data App: Built entirely in Python using Streamlit, leveraging Pandas and Plotly for the UI.
- Partner Data Warehouse: We utilized ClickHouse Cloud for our partner track. We built custom
clickhouse_tools.pyconnectors to ensure our app acts as a live, runtime chat-with-your-data experience. - Agentic Orchestration: We deployed an Antigravity Agent paired with Google Vertex AI (Gemini 2.5 Pro) to interpret user intent, generate ClickHouse SQL, and format the operational response.
- Infrastructure: The application is containerized via Docker and deployed live on Google Cloud Run, secured with IAM bindings (
roles/run.invoker).
Challenges we ran into
Building an enterprise-grade agentic workflow presented strict technical hurdles.
- IAM Permissions: We encountered recurring
403 PERMISSION_DENIEDerrors when our Cloud Run service account tried to trigger Gemini. We had to dynamically reassign theroles/aiplatform.userpolicy binding via the gcloud CLI. - State Management: Executing parallel ClickHouse queries while maintaining Streamlit's session state and rendering complex HTML/CSS trend badges occasionally broke UI responsiveness.
- AI Rate Limiting: Because our URL is public, we implemented hard session limits and cooldown timers natively in Python to prevent API quota exhaustion and unexpected GCP billing spikes.
Accomplishments that we're proud of
- Zero-Mock Data Pipeline: We successfully avoided hardcoded data. Every metric and agentic response is powered by real-time ClickHouse OLAP queries and Vertex AI inference.
- True Agentic Implementation: We successfully met the hackathon's core requirement of building a functional agent that integrates a partner's product to solve real enterprise friction.
- Production-Ready Security: We managed to deploy a live, public-facing database application while keeping all
.envcredentials completely secure from our public GitHub repository.
What we learned
- We gained hands-on experience optimizing ClickHouse for sub-second parallel query performance.
- We learned how to effectively ground Gemini 2.5 Pro so that it outputs strictly formatted, non-destructive SQL queries.
- We mastered Google Cloud Run deployment pipelines, including managing maximum instance limits and IAM policy bindings from the CLI.
What's next for BA_Go Agentic Cinema Decision Control Room
Our immediate next step is expanding BA-Go into a multi-agent system. We plan to introduce an agent that can dynamically adjust Google Ads UAC spending based on real-time ClickHouse revenue dips.
We also intend to implement live, predictive churn forecasting directly into the dashboard using exponential decay modeling:
$$P(\text{churn})=1-e^{-\lambda t}$$
Where $\lambda$ represents the viewer drop-off rate calculated directly from our ClickHouse streaming logs.
Built With
- agentic-ai
- antigravity
- clickhouse
- cloudrun
- docker
- gemini-2.5pro
- google-cloud
- machine-learning
- pandas
- python
- sql
- streamlit
- vertexai
Log in or sign up for Devpost to join the conversation.