Inspiration
I wanted to show an end-to-end Industry 5.0 workflow where real factory telemetry continuously flows into the cloud and an AI assistant can reason over it in plain English.
Goals:
- Ingest live machine telemetry using the industry-standard MQTT protocol.
- Build a custom Fivetran connector to pipe MQTT factory data to Google BigQuery.
- Build a simple web UI (Google’s Mesop) to showcase factory machinery and worker status, plus a chat window.
- Use Google Vertex AI in the chat to explain factory status and suggest next actions.
- Have the AI consider available workers—their schedules, levels, and skills—to recommend assignments and generate task instructions.
What it does
Smart Cookie is a live “factory assistant” for a cookie plant:
- Streams machine telemetry (power, CO₂ per minute, scrap rate) from the line via MQTT.
- Loads it into BigQuery via a Fivetran custom connector.
- Serves a web UI with live cards for each machine and on-demand worker generation for staffing scenarios.
- Lets you chat with the data (Vertex AI) for quick diagnostics and recommendations (e.g., “Which station is the scrap hotspot right now, and who can fix it?”).
How we built it
Data & Cloud
- Data source: MQTT publisher on a small VM simulating six machines (Mixer, Kneader, Cutter, Oven, Cooler, Packer).
- Fivetran Connector SDK: Python connector reads MQTT, normalizes fields, and pushes into BigQuery.
- BigQuery: Dataset
cookie_factory_mqtt, tabletelemetry. Schema includesmachine_id,name,type,ts,power_w,co_2_kg_per_min,scrap_rate_pct. - Vertex AI (Gemini 1.5): Grounded on the latest per-machine snapshot (windowed query). Prompts summarize spikes, flag scrap > 1%, and propose maintenance windows.
App
FastAPI backend
GET /api/machines/latest— returns recent telemetry from BigQuery.POST /api/ai/chat— accepts a user message + telemetry context, calls Vertex AI, and returns the answer to the chat window.
Frontend (Mesop)
- Live machine cards with icons and metric chips.
- Worker generation cards with schedules and skills.
- Chat panel wired to the FastAPI AI route.
Challenges I ran into
- Managing state in Mesop: still tuning reactivity for both user input and fresh telemetry.
- Skipping WebSockets saved time up front, but introduced complexity around the chat stream and telemetry refresh cadence.
Accomplishments that I’m proud of
- Getting MQTT into BigQuery via a custom Fivetran connector. At the time, there wasn’t an out-of-the-box MQTT connector—I plan to contribute this back.
- Building a clean Mesop UI—being able to stay in Python made iteration fast without hopping to TypeScript/JSX.
What I learned
Industry 5.0 is about human augmentation. Beyond robotics, there’s huge value in task optimization and quality-of-life improvements for the workforce—surfacing the right insight at the right moment to the right person.
What’s next for Smart Cookie
- Recommendations → actions: Push suggested tasks to a calendar or ticketing system. Auto-tailor instructions to a worker’s skills and schedule.
- Anomaly & drift: Add BigQuery ML or Vertex AI anomaly detection for predictive alerts.
Built With
- fastapi
- fivetran
- gcp
- google-bigquery
- mesop
- vertex

Log in or sign up for Devpost to join the conversation.