

Customer support is one of the most impactful applications of AI: high volume, repetitive queries, and clear success metrics make it an ideal candidate for automation.
I wanted to understand the core primitives behind these products, so I built a Support AI agent using Cursor for my e-commerce business, Resistorings, to handle customer escalations.
I started by defining 4 core use-cases for the agent:
For each use case, the agent knows when to answer directly from its knowledge base (no API call needed) vs. when to fetch real data using tools. This was needed to reduce latency and cost.
The core architecture follows the agent loop in which the LLM generates a response or triggers a tool call. When thinking about the broader system, I assessed the tradeoffs between a single agent vs. multi-agent architecture. I ultimately chose a single-agent architecture for the following reasons:
As the agent grows in complexity, I can see s future state where I build specialized sub-agents for billing or technical support, which would require a multi-agent architecture.
The Support Agent is built in Python and uses GPT-4o-mini with function calling. I defined five core function/tools that map to each use case:
When defining the tools, I had to set a clear description so the LLM knows when to use it, define parameters, and add business logic around policies. In production, these would call Shopify, Stripe, and internal APIs.
As a starting point with evaluations, I added a feature to trace each step the agent takes. This was especially helpful for observability to understand what tools were triggered. There is still more work to be done around robust offline evaluations before deploying the agent to production.

This website is open-source on GitHub