Back to blog

Show me what the agent built

Sharan Babu••6 min read

The right interface makes it easier to judge the software an agent builds.

A coding agent recently gave me a response type with a strange possibility: it could say “success,” have no result, and still contain an error.

I shared the example because the fix was small: give each outcome its own shape. Success needs a result; failure needs an error. A discriminated union makes that distinction explicit in the type.

Imagine the same problem in a file upload: a green checkmark, no file, and “Upload failed.” You would not know which message to trust.

The clearer type helps the developer catch that contradiction. I want the same clarity when reviewing the rest of an agent’s work.

What do I need to see to know whether this works?

Sometimes I need to see all the states. Sometimes I need to compare two versions. Sometimes I need to change a number and check the result.

The useful interface depends on the question.

For a flow, show the states

Say you ask an agent to add a file upload. It shows you a tidy box with a file icon and an upload button.

That is a start. But what happens while the file is uploading? What if the connection fails? How will someone know the upload finished?

A view of the possible states makes those questions much easier to answer.

The same upload, four states

Static previews

Ready

proposal.pdf2.4 MB

Ready to upload.

Upload file

Uploading

proposal.pdf2.4 MB

62% uploaded

Cancel

Failed

proposal.pdf2.4 MB

Connection lost.

Try again

Uploaded

proposal.pdf2.4 MB

Ready to use.

Four example screens, shown together for review. The action labels are part of the illustrations.

Now I can check the experience without trying to make the connection fail at exactly the right moment:

  • Does the filename stay visible, so I know what I am uploading?
  • Does the error tell me what happened and give me a way to try again?
  • Is it obvious when the file is ready to use?

These are small questions, but they are easy to miss in a screenshot of the finished state.

The view also makes feedback more specific. Instead of “improve error handling,” I can say, “Keep the filename visible when the upload fails, and put ‘Try again’ beside the error.”

That gives the agent a clear change to make and gives me a clear way to review it.

The gallery shows what each state looks like. A state machine helps when the question is how the upload moves between them: which states allow a retry, or what cancelling an upload should do. To check whether those rules work, I still need to run the interactions.

For a visual change, put before and after together

Now imagine a sign-up form that puts an invalid-email error at the top, away from the field. You ask the agent to make the problem easier to find.

A list of changes is not much help here. “Improved error placement and spacing” sounds reasonable, but I need to see the result.

Show me the original and the revision with the same content, at the same size.

Same form, clearer feedback

Static previews
Before

Join the workshop

Enter a valid email address.

Full name
Sam Taylor
Email address
sam@
Continue
After

Join the workshop

Full name
Sam Taylor
Email address
sam@

Enter a valid email address.

Continue
Same content. The error now sits with the field that needs fixing. Both forms use illustrative sample data.

With both versions visible, I can look at the actual decision. Can I immediately see which field needs fixing? Does the error stay close to that field? Are labels grouped clearly with their inputs, including on a small screen?

The matching content matters. A new layout filled with shorter labels and cleaner sample data can look better without solving the original problem.

Keep the comparison close to the thing being changed.

For a spacing fix, two views may be enough. For an animation, I would want to see the motion. For a mobile layout, I would want the narrow version, not reassurance that it is responsive.

For a rule, let me try the numbers

Some changes look fine on screen but can still behave incorrectly.

Suppose a booking page has a simple rule:

Tickets cost $20 each. At five or more tickets, take 10% off the whole ticket subtotal.

An agent can explain that it added the discount. I would rather have a small calculator where I can change the number of tickets and see how the total is worked out.

Try the ticket rule

Local calculator

$20 per ticket.
Buy five or more and take 10% off the whole subtotal.

Try 4 tickets, then 5.

5 tickets × $20
$100.00
Group discount (10%)
−$10.00
Total
$90.00

Illustrative pricing, with no other fees or taxes. Nothing is booked or purchased.

Four tickets should cost $80. Five should cost $90.

Those two inputs are useful because they sit on either side of the rule. If the discount appears at four tickets, starts at six, or stays applied after I change back to four, something is wrong.

The breakdown helps too. A final number alone can hide a mistake. Showing the subtotal and discount lets me see where the number came from.

This is a good place for interaction because changing the input answers the question directly. There is no sequence to sit through and no set of steps to learn.

If I am using this view to check the real booking page, it should use the same pricing function. Otherwise, I have two separate calculators to worry about.

The examples also give the agent straightforward tests: four tickets means $80; five means $90; going from five back to four removes the discount.

Ask for the view that answers the question

These examples need different interfaces because they involve different kinds of judgment.

The upload gallery helps me notice missing states. The before-and-after view helps me judge a visual change. The calculator helps me check a rule.

A small question usually needs a small view. It might only be useful while reviewing one change. That can still be worthwhile if it makes the decision easier.

I would start by telling the agent what I need to check, rather than asking it to build a dashboard. “Show me every upload state.” “Put these two layouts beside each other.” “Let me try the values just below and above the discount.”

If the order of events matters, show the current step, what just happened, and what comes next. If it does not, let me see the important information immediately.

None of these views is proof on its own. A mock screen is not a working feature. A valid response shape does not make an answer true. Incoming data still needs validation, and behavior still needs tests.

But a useful view makes the next question easier to ask.

The small type mistake at the start had a simple lesson: when the rules are clearer, mistakes are easier to spot. I want the interfaces around coding agents to help in the same way.

Give me something I can look at, try, and check.