Back to blogs

Speedrunning Cognitive Kinetic

8 min read
Autonomous Agents Agentic Workflow Hackathon React Native Firebase

The Concept

TL;DR - Any news that affects your business is analyzed and automated actions are suggested.

Some while ago I speedran a mobile app with my team for an AI hackathon, So I thought to document the entire experience.

For the AISeekho hackathon we were supposed to create a mobile app that used Google Antigravity as the orchestration layer. From the choices given to me and my team we decided to build the Insight-to-Action agent. The agent would have context of your business. We integrate different news from news aggregators, you select news to analyze against your business you present your business problem.

The Agent would analyze and come back with a report and suggestions, if you have some API for your business setup, the agent suggests API calls to be made and simulate on approval.

The organizers were not very clear in their communication. They repeatedly stated that the final product must be centered around Google Antigravity (AG), which I understand to be an agentic coding tool. This requirement was highly confusing.

The Stack

So, as the team lead I decided that we’ll build the app in React Native with Expo and for the sake of consistency with the Google ecosystem: Firebase for the auth, database and serverless functions. In short React native + Firebase.

Vibe Coding

The entire app had to be made with Antigravity (AG). AG prompt logs were a requirement. I’ve always been a skeptic with AI coding. I think it’s a great tool but not replacing Software Engineers anytime soon. Each prompt had one problem, the AI had to gather context again and again and again. Ughhh! I hate it to my core - I had to write skills and context files to have it minimize this but it’s unavoidable. Then sometimes it likes to ignore whatever you have directed in a prompt and fail to create reusable components. An example would be consider I have a component <AppText variant="h1"> it will keep using the <Text style={{ fontSize: 32 }}> primitives ruining the theming.

But (there’s always a but) it’s not all doom. It made a complete end to end application, be it after continuous optimization of prompts, skills multiple MCP servers and context files. If someone isn’t like me, who just enjoys the process of writing code maybe it works for them. Personally I just think it’s just too much in the way, writing skills and prompts isn’t really engineering after all.

A more cynical approach would be: have the AI do the work, review it and if changes are required do them yourself; this works the best for me. A little code here and there doesn’t hurt anyone.

NoSQL is weird

Before this I had never worked on NoSQL Databases, so I had no opinion on them. After using Firestore which is a document-oriented DB, I thought to myself the idea is pretty clean, whoever came up with this idea must have won some DB Design award or something. I had AI write most of the security rules and help with modeling the document and collection structure. It definitely feels weird coming from a relational SQL background, but the overall experience was 👍🏻

The term “NoSQL” was first coined in 1998 by Carlo Strozzi. Funny enough he called his DB Strozzi NoSQL. However it’s not what Modern NoSQL is like.

Early Modern NoSQL systems are Google’s Bigtable (2006) & Amazon’s Dynamo (2007),

Unfortunately neither Strozzi, Google or Amazon win any award for designing these systems but they would’ve definitely made a lot of money.

Cloud Functions

Building a custom, concurrency-optimized backend was unnecessary for this application. We selected Firebase Cloud Functions to handle event-driven operations and scale automatically, routing tasks directly to Google Cloud Run Worker Pools. These worker pools sequentially process heavy, stateful analytical pipelines that require extended execution times. For example, a worker instance continuously pulls extracted signals from a queue to execute resource-intensive Insight Generation without hitting standard serverless timeouts. Another example is utilizing a worker pool to compute complex Impact Modeling tasks in the background while the frontend remains fully responsive.


Architecture

Ingestion and Context

The system begins by capturing unstructured external content, such as news feeds or manual alerts, and passes it through a data normalizer to standardize the format. This normalized data undergoes an agentic relevance check, which evaluates the incoming information against a saved operating profile containing specific business contexts like locations, goals, and concerns.

Processing and Routing

Data deemed irrelevant is routed to an archive for auto-pruning, which simultaneously feeds back into the operating profile to refine future filtering capabilities. Data identified as relevant moves forward to a signal extraction phase, where the system isolates critical facts, market fluctuations, and severity metrics for deeper computational analysis.

Genkit Backend Worker

Extracted signals are processed by the backend worker to generate contextual insights. These insights are fed into an impact modeling engine to calculate potential business consequences. The resulting data is subsequently structured into an action formulations grid, providing a defined set of potential responses and operational adjustments.

Human-in-the-Loop Simulation

The action formulations grid is presented in an interactive simulation environment where a human operator can test and select specific outcomes. Operator decisions trigger atomic transaction state mutations, which simultaneously write to developer execution logs for auditing and update a mock live database state to reflect the chosen actions safely.

Output and Visualization

The final mock live database state directly drives the frontend presentation layer. As the transaction mutation updates the state, it triggers a real-time UI update, projecting the finalized data and system impacts directly onto the primary dashboard screen.

Visual Representation

arch

Key Security Safeguards

  • User Data Isolation: Rules verify request.auth.uid == userId for every collection read or write under users/{userId}. A pretty basic check.
  • Client Mutation Locks: Collections containing model-generated analyses (analysisRuns), live systems (mockState), and simulated logs (simulations) have allow write: if false; rules. Writes are completely restricted to the Firebase Admin SDK running on Cloud Functions.
  • News Feed Integrity: The client is prohibited from editing relevance scores, selection reasons, or source URLs on news items (feedItems). The client can only update status variables such as: mark a news as read/saved or dismiss/delete.
  • Field Type Validation: Strict validation schemas enforce max character counts such as: email must be under 320, profile names under 160 and verify field arrays directly in Firestore rules before processing.

The Pitch

Out of 650+ teams we made it into the final 40 teams. We topped our region, ranking 1st out of 16. Next phase of the Hackathon was pitching your idea, to qualify for National Finals.

1. Problem Identification

We presented the problem statement to the evaluators which were as follows:

  • There are dozens of news items per hour. There is no automated way to separate signal from noise especially related to your business.
  • Businesses constantly shift focus based on analyst suggestions. In that case keyword filters go stale the moment strategy changes.
  • Existing tools only summarize. Decision makers need the system to alert, escalate, and act. This is exactly what Cognitive Kinetic provides

2. Use Case with a Case Study

The case study we presented was of a food delivery app. Consider that there’s a hike in the fuel prices. The agent will analyze the price hike and impact on the business. Logically it will suggest increasing the delivery price. If the business has uploaded its API end-points to update delivery price the AI will also attach the action in the analysis report. The user can then decide to revise the delivery charges or reject them altogether

3. Viability & Scalability

According to our limited market analysis there was a huge void for such a product where if we were to complete production of the service, we could capture a huge chunk of the market share due to the early mover advantage. So, the product did look viable. For a platform using cloud based services scalability wasn’t really an issue.

Projecting 60% market capture and seed funding of PKR 1,000,000; we would be looking at a time to market in 2 months with sales over the first 2 fiscal year to exceed initial funding. Such high confidence is due to high likelihood of adoption by SMEs and even Large Enterprises as we gain market trust.

Outcome

The team believed we made a convincing pitch but contrary to our belief we didn’t make it through to the final round. We have asked the evaluation team to provide their remarks on the pitch which we can reflect on and improve for the future.


Concluding Remarks

It was a great experience in working on the project, working with Google’s Antigravity IDE and pitching for the product we built. Even though we didn’t make it through to the National Finals just making it to the Regional shortlist was a big achievement. Also did I mention, all of this was done while our semester finals were happening 😂

Special Thanks

A special special shout-out to my boiz, would’ve not been possible without them! Check them out they’re doing cool stuff.

For any investors reading (I wish), if you want to fund us to continue development on this product we’re open for discussions. Just email me

For the code junkies, you can check out the repo at @cognitive-kinetic