Inspiration

Most e-commerce experiences are still built around one assumption: humans click, search, compare, and checkout manually.

But AI agents are becoming capable of understanding intent, making decisions, and using tools.

So we asked:

What happens when AI stops being just a shopping assistant and becomes part of the commerce journey itself?

That question led us to build Kaapi Copilot — an AI-native storefront designed for both human shoppers and AI buyers.

Instead of navigating through endless product pages, a user can simply say what they want, define a budget, and let the agent help them discover, evaluate, add, and safely purchase products.

What it does

Kaapi Copilot turns traditional e-commerce into a conversational and agent-driven experience.

A user can say:

  • “I need coffee under ₹1,000.”
  • “Add the second one.”
  • “Add both.”
  • “Recommend something that goes well with this.”
  • “Checkout.”

The system understands the conversation, remembers context, respects the user's budget, and performs actions through structured commerce tools.

Kaapi Copilot supports two core journeys:

Human Buyer Journey

Customers interact naturally with an AI shopping assistant that can:

  • Discover relevant products
  • Understand budget constraints
  • Recommend products
  • Resolve references like “it”, “this”, and “both”
  • Add products to the cart
  • Suggest relevant upsells
  • Guide the customer toward checkout

AI Buyer Journey

External AI agents can interact directly with the commerce layer through MCP-style tools.

This allows AI systems to:

  • Add products to a cart
  • Work within defined spending limits
  • Trigger controlled checkout flows
  • Confirm payments
  • Interact with commerce without relying on a traditional UI

The goal is simple: make commerce usable not only by humans, but by AI agents as first-class buyers.

How we built it

We designed Kaapi Copilot as a full-stack agentic commerce system.

The backend is built with FastAPI, handling:

  • Product discovery
  • Cart operations
  • Session state
  • Checkout
  • Orders
  • Analytics
  • Agent tool execution

We integrated an LLM-powered assistant to understand natural language and customer intent.

For real commerce actions, the AI does not directly modify the system. Instead, it uses structured tools such as:

  • add_to_cart
  • confirm_and_pay

This separation was important because we wanted the LLM to handle reasoning and conversation, while deterministic backend logic handles money, validation, and state changes.

We used SQLite for persistent session state, orders, carts, and analytics.

The frontend provides the interactive shopping experience, while the backend exposes APIs that can also be used by AI agents.

We also added several guardrails:

  • Budget limits
  • Explicit checkout confirmation
  • Idempotent payments
  • Payment failure handling
  • Session persistence
  • Audit logs

These safeguards help ensure that AI agents can act without becoming unpredictable.

Challenges we ran into

1. Maintaining conversational context

Initially, the assistant could understand individual messages but sometimes lost track of what had been discussed earlier.

For example, after recommending multiple products, a user might say:

“Add both.”

The system needed to know exactly what “both” referred to.

We solved this by maintaining conversation history and persistent session state.

2. Reference resolution

Natural language is ambiguous.

Commands like:

  • “Add it”
  • “Take this one”
  • “Add both”
  • “The second product”

sound simple to a human but require context-aware resolution.

We built logic to map conversational references back to the correct products before executing any cart action.

3. Preventing duplicate payments

AI agents may retry tool calls if they do not receive the expected response.

In payments, retries are dangerous because the same request could create duplicate orders.

We solved this by implementing idempotent checkout, ensuring repeated payment requests do not create duplicate transactions.

4. Handling failed payments safely

A failed payment should not silently continue or be reused incorrectly.

We added logic that rejects failed payment attempts and requires a new payment flow before completing the order.

5. Measuring real business impact

We did not want the project to be just a chatbot demo.

We added analytics for:

  • Orders paid
  • Average Order Value
  • Upsell performance
  • Agent-driven commerce

This allowed us to measure whether the AI was actually creating business value.

Accomplishments that we're proud of

The biggest accomplishment is that Kaapi Copilot is not just an AI chatbot layered on top of a store.

It is an end-to-end agentic commerce system where the AI can safely move from conversation to action.

We successfully built:

  • A conversational AI shopping experience
  • Human and AI buyer journeys
  • MCP-style commerce tools
  • Budget-aware purchasing
  • Context-aware reference resolution
  • Intelligent upselling
  • Persistent sessions
  • Idempotent checkout
  • Payment failure recovery
  • Audit trails
  • Commerce analytics

In our demo, the agent-driven journey achieved an Average Order Value of ₹1,100 compared to a ₹450 baseline, demonstrating how conversational recommendations and upselling can potentially increase basket value.

More importantly, we showed that AI can participate in commerce while still respecting deterministic business rules and payment guardrails.

What we learned

The biggest lesson was that agentic commerce is not primarily an LLM problem — it is a systems-design problem.

Making an AI recommend a product is easy.

Making an AI safely interact with carts, budgets, payments, retries, failures, and business rules is much harder.

We learned that reliable AI commerce requires:

  • LLMs for understanding and reasoning
  • Structured tools for actions
  • Deterministic logic for critical operations
  • Persistent state for context
  • Idempotency for retries
  • Guardrails around payments
  • Auditability for trust
  • Analytics for measuring business value

We also gained hands-on experience with FastAPI, LLM agents, MCP-style tooling, API design, state management, payments, deployment, testing, and agentic system architecture.

What's next for Kaapi-Copilot

Kaapi Copilot is currently a proof of what AI-native commerce can become.

Next, we want to expand it into a broader agentic commerce infrastructure layer.

Planned features include:

  • Real Razorpay payment integration
  • Personalized recommendations using purchase history
  • Inventory-aware recommendations
  • Dynamic discounts and offers
  • Voice-based shopping
  • Order tracking and post-purchase support
  • Multi-merchant support
  • Merchant analytics dashboards
  • More advanced agent safety controls
  • Standardized APIs for external AI agents

Our long-term vision is a commerce ecosystem where a customer can simply express intent:

“Buy me the best coffee setup under ₹2,000.”

…and an AI agent can safely handle everything from discovery to checkout.

Kaapi Copilot is our step toward a future where websites are no longer built only for humans — they are built for agents too.

Built With

Share this project:

Updates

Submission history