Inspiration
The inspiration for this project comes from watching the industry shift toward agentic workflows. Because of this shift, I wanted to explore how agentic workflows can be applied to creating real-time data views.
When I co-founded a startup building Alexa skills for brands, coding every conversational flow from scratch was unsustainable. So I built a headless engine that let humans create structured data instead — a JSON file paired with assets that the engine would interpret to handle both voice and multi-modal interactions. We weren't coding skills anymore; we were authoring structured data that scaled.
This inspired me to explore how the same idea could be applied to building web platforms and SaaS applications. Low-Code Application Platforms existed, but they came with real limitations — locked into their own ecosystems, restrictive about which libraries you could use. I wanted something lightweight and open: a platform that could load any library. No vendor lock-in. That's why, before this project, I built a declarative UI Abstract Syntax Tree (UI AST) rendering engine — what I now call Ketrik Shell. It solves the core problem: how do you render complex, dynamic interfaces from structured data without hardcoding every component?
With that foundation in place, the next question became obvious: what if agents could watch data streams, detect patterns, and autonomously build the visual interfaces users need in real time?
What It Does
This project is a system of serverless AI agents triggered by user actions and external events. Instead of waiting for prompts, these agents react autonomously and execute multi-step workflows.
The agents produce structured UI artifacts: dashboards, metric cards, charts, tables, and live data streams for platforms running on Ketrik Shell. They don't output fragile raw code. Instead, they generate a structured JSON UI Abstract Syntax Tree that the platform renders into interactive interfaces.
Just like my headless engine mapped data to conversational turns, these agents map events to visual components — but now they do it in the background.
How I Built It
The architecture came down to three decisions that solved the core problems.
Serverless event triggers — agents wake up on-demand when something happens, so they scale cleanly without burning idle resources.
Multi-step workflow execution — instead of trying to cram everything into a single massive prompt, agents chain focused tasks together: research, then analysis, then visualization. Each step does one thing well.
Section-by-section UI updates — rather than regenerating the entire interface on every event, agents mutate specific layout sections, so updates are incremental and targeted.
Everything runs serverless with state persisted directly in Firestore, so workflows stay durable and decoupled from in-memory state. If an agent crashes, the next invocation can access the persisted state and restart the workflow.
The Challenges I Faced
The hardest part was teaching LLMs to think in structured user interfaces instead of text. Models naturally default to generating unstructured markdown or raw code, which breaks design systems and runtime styling.
I had to design strict tool contracts and typed section schemas so the agent reliably inspects raw data, selects the right visual archetypes (charts, KPI metrics, tables), and outputs clean, renderable UI AST nodes.
The second challenge was realizing that regenerating the entire UI on every event was wasteful and fragile. I had to rethink the architecture so agents could update specific layout sections incrementally, rather than rewriting the whole dashboard each time — a shift that required rethinking both the agent behavior and the rendering pipeline.
Accomplishments I'm Proud Of
This project is still in active development, and my biggest accomplishment is simply getting this core architecture to actually work. I've successfully built a system where, by separating UI rendering from UI definition using declarative JSON ASTs, agents can reliably assemble the visual interfaces users actually need. I'm not trying to replace human judgment — I'm building a foundation where autonomous agents can watch, react, and construct the tools you need, keeping humans firmly in the loop.
What I Learned
Through this process, I learned that the future of AI isn't smarter chatbots waiting for prompts — it's agents that react to the world around them. Real digital work happens in rich, visual interfaces, and operational systems should adapt on their own, rather than requiring constant manual rebuilding.
What's Next
Next, I'm taking this architecture into production — hardening runtime reliability, adding deeper observability, and scaling out the fleet with new specialized agent personas. I plan to introduce dedicated personas for domains like automated financial reporting, real-time security auditing, and data triage, allowing teams to plug custom event triggers into an expanding library of agents that collaborate on the same workspace.
Built With
- firebase
- firebase-admin
- firebase-functions
- firestore
- genai
- javascript
- node.js
- typescript
Log in or sign up for Devpost to join the conversation.