HUMARACART
What v1 Didn't Cover
Coordination over WhatsApp, and how it actually talks to Instamart
THE MESSAGING LAYER
WhatsApp Doesn't Support Group Bots
What You'd Expect
One WhatsApp group.
Everyone in it, talking to one bot together.
What We Built
N separate 1:1 threads with the bot.
The backend maps each one to a single household ID: one shared cart underneath.
The Business API terms forbid group bots, so the household is a backend concept, not a WhatsApp one.
ROLES & PERMISSIONS
Who Can Do What
Member
✓ Add items to the cart
✓ Remove items from the cart
✓ Nudge the holder to check out
Account Holder
✓ Sets the delivery address
✓ Add items to the cart
✓ Remove items from the cart
✓ Confirm checkout & choose payment method
ELI5
What is MCP?
MCP
An open standard that lets an AI agent call external tools in a consistent way, regardless of who built them
Tool
A single callable function a server exposes, with defined inputs and outputs (e.g. search_products)
MCP Client
The agent side. Discovers what tools are available and calls them: this is HumaraCart's role
MCP Server
The provider side. Exposes a set of tools over the protocol: this is what Instamart runs
ARCHITECTURE
Where HumaraCart Sits
HumaraCart
Agent: the MCP Client
Instamart
Backend: the MCP Server
MCP
HumaraCart never talks to Instamart directly: every call and every result crosses this one standard interface.
THE AGENTIC PART
LangGraph + Human-in-the-Loop
agent
calls the LLM, decides next step
tools
calls Instamart MCP
ask_human
pauses the graph for a person
START → agent → tools → agent → … → END
ask_human pauses for two things: picking a variant, or confirming a checkout, whose first call only previews. The real order is placed by a second, code-issued call.
checkout confirmed
START
END
AVAILABLE TOOL CALLS
What HumaraCart Actually Calls
Discover
get_addresses
search_products
Cart
update_cart
get_cart
clear_cart
Payment
get_payment_options
Order
checkout
Track
get_orders
Let's Look at the Docs
mcp.swiggy.com/builders/docs/reference/instamart: the rest of the toolbox, live
CONSTRAINTS & CHALLENGES
What Was Hard
▸ Wrong person could answer a pending question: a race in who a paused question was actually addressed to
▸ Concurrent messages could race on the same session: two messages for one household hitting the agent at once
▸ Sync def, or async, for the background handler?: every message triggers a slow LLM call and an MCP round-trip; both concurrency models were on the table
HUMARACART
Thank you.