Elevate quick commerce app’s user experience using AI agents
Disclaimer: This article is based on my current knowledge and understanding. If you have any questions or suggestions for improvement, please mention them in the comments section.
I am a 90s kid, and as the internet has evolved, so have I. Between 2008–2010, I saw a rise in web applications. Then, from 2012–2016, native apps (Android, iOS) became the dominant trend. By 2019, I was writing chat apps using LUIS and the Microsoft Bot Framework and saw the rise of embedded chatbots in major applications. Now, I see another shift in the application paradigm — AI agent-based apps.
Instead of defining AI agent-based apps formally, let’s explore a problem statement.
Problem Statement
Can we have a quick-commerce app where a user enters a food name, the app fetches the recipe ingredients, and then places an order?
Example: “I want to make banana pancakes.”
This problem can be solved without AI, but AI agents (powered by LLMs) are exceptionally good at understanding user intent and automating multi-step workflows.
Solving This with AI Agent-Based Apps
1. The user query lands on the workflow engine.
2. The workflow engine spawns multiple tasks sequentially to complete the user’s request. To place the order, we first need to determine what ingredients the recipe requires. For this, we will use an AI agent to search for the ingredients and return them in a concise, structured format.
3. The AI agent provides the requested details in the desired format (though LLMs can sometimes hallucinate).
4. The workflow engine spawns another task to call the order placement API with the required details.
5. Finally, the order gets placed.
I have deliberately left out details on how authentication works, whether you would use a wallet for payment, or how the payment implementation would look. I will cover these topics in another blog post. The true intent of this article is to introduce this new paradigm in app building.
You might wonder: why not maintain a structured recipe database and query it instead of using an LLM? The answer is yes, you can do that. However, maintaining such a database comes with challenges, especially if users request niche dishes. AI agents allow for more flexibility in retrieving and synthesizing information dynamically.
Can We Take This Even Further?
Instead of defining the workflow engine in code, could we let LLM-powered AI agents dynamically determine the sequence of tasks? Theoretically, yes. However, I prefer the workflow engine approach because it allows me to reason about my system’s behavior more accurately and maintain control over execution.
What an exciting time to be a software engineer! So much is happening in this space. I hope I was able to share my vision clearly with this example. Feel free to write back if you have similar use cases in mind.
~ Happy Coding!
Another Example: BFSI Domain
Banks have multiple departments, and routing end-user queries to the correct department with minimal delay can greatly enhance user experience. LLM-based AI agents can quickly parse email content and direct it to the appropriate department, streamlining operations.