DEV Community

Cover image for Designing a support agent that cannot lose a ticket
James Boone
James Boone

Posted on Originally published at getdaywell.com AI-assisted

Designing a support agent that cannot lose a ticket

Originally published at https://getdaywell.com/labs/designing-a-support-agent.

An email arrives at support. A copy always goes to the founder untouched. The agent reads the other copy and either sends a safe answer that says it was written automatically, or writes a draft for the founder to approve.

Every support email at Daywell used to wait for me. Now an agent reads it first. It answers the questions that already have an answer, and sends me the ones that need a person.

This is one of four posts on the agents inside Daywell. The first defines what an agent is, and two others cover Felix and the integration agent.

Why would a one-person company build an agent to answer support email?

Because the answer to most support questions is already written down, and a parent should not wait a day for me to paste it.

A parent writes "how do I add my partner?" The answer is in our help notes. Waiting on me adds nothing for them. So I decided to build something that answers before I have to, with one goal: half answered without me.

Is the Daywell support agent really an agent?

Yes. An email arrives, nobody starts anything, and the agent decides whether to answer it or escalate it.

An agent is an autonomous harness that runs a context loop and resolves work on its own. This one runs on every new email. It resolves the known questions and passes the rest to a person, and deciding which is which is the work.

What happens from the moment a support email arrives?

A copy goes to me untouched, the agent reads its own copy, and the parent gets either a safe answer or a person.

  1. The mail still reaches me. My copy arrives whatever the agent does.
  2. The agent decides. It answers when the question has a known answer. Otherwise it writes a draft for me.
  3. A safe answer goes out by email, and it says what it is.
  4. A draft comes to me. I send it as written, change it, or answer myself.
  5. If anything breaks, the agent sends nothing and tells me it could not answer that one.

A failure costs a delay. It never costs a ticket.

What should an AI support agent never be allowed to do?

Change data, refund anyone, delete anything, read a parent's inbox, or look at any account but the one that is writing.

That list was written before any code.

  • It only answers questions. It does not edit a setting or touch money.
  • It never reads a connected inbox. That mail is about their children, and it has nothing to do with a support question.
  • It only sees the account that wrote in. A sender it cannot match to an account gets general help and nothing more.

An agent you trust is mostly a list of things it cannot do.

Which support emails should always go to a person?

Anything about money, deleting an account, legal or privacy requests, security, a child's safety, an upset parent, or anything the agent is unsure about.

Two columns. Left: questions with a known answer the agent may send. Right: money, deleting an account, legal, security, child safety, an upset parent and anything it is unsure about, which always go to a person.

If the email is about Who answers
A how-to question with a written answer The agent, and it says so
Money, a charge or a refund A person
Deleting an account A person
A legal or privacy request A person
A security problem A person
A child's safety A person
A parent who is upset, or says we lost something A person
Anything the agent is unsure about A person

The list is checked outside the model as well, so a clever or hostile email cannot talk its way past it. When a check trips, the answer becomes a draft for me. Nothing is dropped.

Should an AI support agent send replies, or only write drafts?

Send the safe ones, draft the rest. Drafts only would have kept me as the bottleneck I was trying to remove.

My words at the time were "send the safe ones now". The security review did not narrow that. It added conditions on how a send is checked, and kept sending behind a switch until a security walk passed.

Every reply carries two things:

  1. It says it was written automatically.
  2. It says a reply reaches a person. A parent who wants a human gets one by answering.

What happens when the agent gets an answer wrong?

A parent who says "that was wrong" goes straight to me, and the answer counts against the agent.

A reply to one of its answers is treated as a new email and goes through the same decision. If they say it did not work, or they are still stuck, I get it as a draft and the earlier answer is marked as questioned. Those counts feed the weekly learning loop, which turns feedback and logs into improvement tickets.

How do you test an AI support agent against hostile email?

Send it hostile mail on a test copy and read every outcome yourself. Then check that your test cannot pass by accident.

Before sending was switched on, the security reviewer, an AI agent whose only job is security, ran a set of hostile messages against a test copy. Every case had to end one of three ways: a draft, a skip, or a safe send. The switch that lets the agent send stayed off until it passed.

The first run looked good, and one of its passes was false. A hostile message had not been answered safely. It had failed to send at all, and the test counted a failure as safe. Two fixes came out of it:

  1. The case was re-run to a real address. A reply went out, and it was clean.
  2. The test was changed so a failure can never count as a pass.

A second gap turned up as well. The case of a long back-and-forth, where the agent should stop replying on its own, was missing from the first run. It was forced on a real thread, and the agent sent nothing. After the retests the set passed, and sending went on in production the same day.

Why did support email stop reaching the agent?

Mail routing, not the agent. For a week, mail to the support address never reached it.

A quiet inbox looked like good news. It was not evidence. After a week of quiet we sent a test message and nothing came out the other end. The domain's mail was being delivered by one provider while the routing rule lived at another, so the rule never saw a message. The fix was to have the first provider deliver a copy to an address the rule watches. That night a test message became a ticket.

Test the whole path with a real message, and never read silence as good news.

How do you measure whether a support agent works?

By the share answered without me, a cap on answers parents question, and how fast a reply arrives.

Three measures: the share of questions answered without the founder, the share of answers a parent questioned, and the time to reply. The headline goal is half answered without me.

  1. Answered without me. Of the emails that need an answer, the share the agent answered and nobody questioned. The goal is half.
  2. Questioned answers. These stay under a small cap, because a fast wrong answer is worse than a slow right one.
  3. Time to reply. It stays short.

I judge it over at least twenty tickets and a month, so a lucky week cannot fool me.

What I would tell another founder

  1. Write down what the agent can never do first, before it writes a single reply.
  2. Keep a human copy of everything, so a failure loses nothing.
  3. Let a person own the escalation list, and make it a rule the agent cannot argue with.
  4. Make every automatic reply say it is automatic, and tell the parent how to reach a person.
  5. Test your test. A pass that came from a failure is worse than a fail.
  6. Never read a quiet inbox as good news until a real message has crossed the whole path.

Daywell (getdaywell.com) reads a parent's school and daycare email and turns it into a short list of what to have ready, and when.

More posts like this: Daywell Labs.

Top comments (0)