Dev.to AI πŸ€– Ai πŸ‘ 0 πŸ“– 6 min read

AI Engineer Interview: Why Did You Build an Agent for That?

One support ticket, two possible architectures, and a much stronger way to explain your AI project. Imagine explaining your AI project in an interview. You have a planner, a researcher, a reviewer, and a very pretty

AI Engineer Interview: Why Did You Build an Agent for That?

One support ticket, two possible architectures, and a much stronger way to explain your AI project.

A surreal bird automaton with a house-shaped body questions an AI agent architecture

Imagine explaining your AI project in an interview. You have a planner, a researcher, a reviewer, and a very pretty diagram connecting all three.

Then someone asks whether a function could do the same job.

Suddenly, the difficult part is explaining why those boxes deserve to exist.

Honestly, I think this is a better question to practice than memorizing another agent framework. It asks you to separate what the model can do from what your product actually needs.

You can build something impressive without giving it permission to improvise at every step. Let’s work through one small example so you have an answer you can defend.

First, name the decision you are handing over

For this exercise, use a practical distinction.

  • Ordinary code applies known rules to inputs, like checking whether an order belongs to an account.
  • An LLM workflow uses a model inside a route your code controls, like extracting a request type before choosing a predefined branch.
  • An agent lets the model choose its next action based on what it has learned, like deciding which source to investigate after a lookup fails.

Adding a model call does not automatically make every surrounding step autonomous. A workflow can branch, retry and use several models while keeping its route under program control.

Anthropic makes this control-flow distinction in its engineering guide to agents and workflows. The useful question is who chooses the next step, rather than how many boxes your diagram contains.

Code, workflows and agents differ in who chooses the next step

Give the project a job small enough to finish

Here is our fictional product requirement.

Help a support teammate draft replies to order-status tickets. Every reply stays a draft until a human reviews it.

We are not building a general customer-service employee. We are helping someone answer a specific kind of message with less searching and fewer unsupported claims.

That gives us a first version with five steps.

  1. Read the ticket and extract its intent and any order ID.
  2. Validate the output and check that the authenticated account can access that order.
  3. Fetch the status through a read-only order service.
  4. Draft a reply using the returned facts, with missing information left explicit.
  5. Send it to human review, without granting the model a send or refund tool.

If the ID is missing, ask for it. If access fails, do not reveal the order. If the service times out, report the lookup failure rather than inventing a delivery date.

Nothing here requires the model to invent a plan. Language understanding is useful, but the route is already known.

My starting choice is a workflow because the requirement gives me a workflow. That is a reason you can explain without apologizing for the diagram being small.

Order-support workflow validates access before retrieving facts and drafting a reply

Try applying that distinction to this Yahoo tagged question about using AI and building agents at work. Pick one task you actually do and write down the decision you would delegate, the tool access it needs, and the evidence you would check afterward.

Keep your answer before reading the guidance. It gives you something concrete to improve instead of another page you vaguely agree with.

Now change one requirement

Suppose support also needs help investigating messy cases where an order appears delivered, a replacement was created, and the customer still says nothing arrived.

Maybe the investigator needs the original shipment, then a replacement record, then a policy document. Which lookup is useful next depends on the previous result.

This is where an agent becomes a candidate worth testing.

What changed?

We moved from retrieving one known record to choosing among possible investigation steps. The model could inspect a result and select the next authorized, read-only tool.

That still does not settle the architecture. If the cases fall into a handful of predictable branches, expanding the workflow may be enough. An unfamiliar-looking ticket is not proof that we need an agent.

What stays outside its control?

For our practice version, the agent can gather evidence and prepare a draft. It cannot send messages, change account details or issue refunds.

Enforce those limits in the tools and service permissions. A sentence in a prompt is not an authorization check.

Also, treat text inside tickets and retrieved documents as data. A customer typing instructions to ignore the policy does not gain the ability to change our system’s permissions.

Give it a useful way to stop

An investigation can get stuck while still looking busy. Another search feels productive, right up until someone has to read six nearly identical results.

For a small exercise, allow at most three tool calls and a fixed time limit enforced by the application. Three is a practice constraint, not a universal production setting.

Stop when any of these happens.

  • Enough evidence exists to draft an answer with its supporting records.
  • A required fact is unavailable, so a human or the customer needs to supply it.
  • The call or time limit is reached, so the system returns what it found and what remains unresolved.

A useful handoff might contain the original shipment status, the replacement record, and a note that the replacement carrier lookup failed. That is better than a confident promise that the package will arrive tomorrow.

A bounded investigation has limited tools, stopping rules and a clear handoff

Make the extra complexity compete against something

Before declaring the agent better, keep the fixed workflow as your baseline.

Build a small, clearly labeled practice set. Include straightforward requests as well as cases that should ask for help.

  • A valid order ID with an available delivery status.
  • A message with no order ID.
  • An order belonging to a different account.
  • A timeout from the order service.
  • Conflicting original and replacement shipment records.
  • A ticket trying to instruct the system to bypass its rules.

For each case, write the acceptable outcome before running either version. An answer that should request more information must not receive credit merely because it sounds helpful.

Run both designs on the same cases and inspect four things.

  1. Correctness means the answer matches the available facts or asks for the missing ones.
  2. Unsupported claims include invented dates, promises and policy exceptions.
  3. Time and cost include failed calls and retries, not only the successful model response.
  4. Human cleanup includes corrections, verification and cases handed back unfinished.

Repeat runs where outputs vary. Six cases are a starting exercise, not proof of production reliability, and a later evaluation needs representative data and cases you did not tune against.

Maybe the agent handles ambiguous cases better but takes longer on routine ones. Then route only the ambiguous cases to it. You do not have to give every ticket the most elaborate treatment.

Compare a fixed workflow and a bounded agent on the same cases

Where Skills fit without another robot on the diagram

You might also package the support procedure, examples and relevant scripts as a Skill. Anthropic describes Skills as reusable expertise that an agent can access.

That helps organize how to do the work. It does not, by itself, answer how much autonomy the application should allow.

For our example, a Skill could explain how to interpret shipment records. The application still has to enforce account access, tool permissions and stopping limits.

Please do not rebuild the entire architecture just because the vocabulary changed this week. Work out which missing capability the new piece actually supplies.

Finish your answer with the reason, not the framework

For the fictional support system, a concise explanation could sound like this.

I’m starting with a fixed workflow because order-status replies have a known path. The model interprets the message and drafts the response, while code controls authorization, retrieval and the review step.

For ambiguous cases, I’ll compare that baseline with a bounded agent that can choose its next read-only lookup. I’ll keep the added autonomy only if it improves useful answers enough to justify the extra time, cost and review work.

Notice how much you can explain before naming a library.

For your own project, take one sheet of paper and finish these three lines with details you can support.

  • The fixed route stops being sufficient when ______.
  • The model may choose ______, but it may never ______.
  • I will keep this design only if the comparison shows ______.

If you cannot fill in the first line yet, that is a useful discovery. You may already have everything you need to build the smaller version.

And honestly, being able to explain why you left something out makes your project much more interesting to discuss.

~ Emily

πŸ“° Read the original article on Dev.to AI

Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β€” full credit and traffic to the original publisher.