Lab Experiments

Building an AI agent that can investigate customer support requests

Notes from a prototype that reads a support ticket, checks the order system, and drafts what happened.

We built a small agent to investigate support tickets. Given a ticket, it looks up the order, checks the shipment, and writes a short brief: what the customer asked, what the systems show, and what a person should do next.

The stack was AWS Bedrock for the model, Strands Agents for the tool loop, and a few TypeScript tools in front of a stand-in order API. The goal was not to send replies. It was to see whether an agent could do the lookup work a support lead does before they answer.

What worked

The happy path was convincing. A ticket that said "my package never arrived" produced a brief with the order id, the carrier status, and a suggested next step. The agent called tools in a sensible order: identify the order, then check shipping, then stop.

Keeping the tools narrow helped. getOrder and getShipment returned small JSON objects, so the agent had less room to wander.

What didn't

The agent kept going when the data was missing. If the order id in the ticket was wrong, it tried variations, then called the same tool again with a slightly different argument. We had not given it a way to say "I can't find this." It treated uncertainty as a reason to search harder.

The brief also sounded confident when a tool had failed. We now require each tool result to include an explicit found flag, and the prompt tells the agent to quote that state in the brief.

type ToolResult = {
  found: boolean;
  summary: string;
};

What we would change next

Stop the loop after two failed lookups. Show the tool trace next to the brief, so a person can see which calls actually returned data. Only then consider letting the agent draft a customer-facing reply.