Agents & Tools Interview Prep

Course Content

Agents & Tools Interview Prep

6 sections · 40 lessons

What defines an AI agent, and how is it different from a simple LLM response system?


What you need to know

Three properties separate an agent from a single model call:

  • The model controls the flow. Your code does not hard-code "first search, then summarise". The model picks the next step each turn, and the number of steps changes from task to task.
  • Tools with real effects. The model can query a database, call an API or write a file — not just describe doing it. Without tools, the loop has nothing to observe.
  • State across steps. Each tool result is added to the conversation, so what the agent learned in step 2 shapes what it does in step 3.

The spectrum, not a yes/no

ShapeWho decides the stepsExample
Single callNobody — one stepClassify a support email
Workflow (chain)Your code, fixed in advanceRetrieve docs → answer → check citations
AgentThe model, at runtime"Find out why last night's deploy failed and open a fix"

Most production "AI features" are single calls or workflows. They are cheaper, faster, easier to test, and fail in predictable ways. You move right on this table only when the steps genuinely depend on what you find along the way.

When an agent is worth it

Check four things before building one:

  1. Complexity — the task is multi-step and hard to specify in advance.
  2. Value — the result is worth several model calls and some seconds of waiting.
  3. Capability — the model can actually do each step reliably.
  4. Cost of error — mistakes can be caught and undone (tests, review, rollback, approval).

If any answer is "no", stay with a workflow.

A real-life example

A travel company builds two features.

Feature 1: "Summarise my booking." The user taps a button; the app sends the booking JSON to the model and shows a three-line summary. One call, about 1 second, a fraction of a cent. This is not an agent, and it should not be one.

Feature 2: "Plan a 4-day Goa trip for two under ₹60,000 in December." Now the steps depend on the data. The agent calls search_flights (Delhi–Goa, 20–24 Dec), sees fares of ₹9,000–₹14,000 each, calls search_hotels with the remaining budget, finds most beach hotels are full, and changes plan — it searches North Goa instead, then checks that the total fits. It takes 7 tool calls and 25 seconds. A fixed workflow could not have known to switch areas.

The team ships feature 1 as a single call and feature 2 as an agent, with a 12-step cap and no booking tool at all — the agent only proposes; the user books.

Follow-up questions to expect

  • "Is a RAG chatbot an agent?" — Usually not. If retrieval always happens once before answering, it is a workflow. It becomes agentic when the model decides whether, what and how often to search.
  • "What is the minimum you need to build an agent?" — A model that supports tool calling, a loop that runs the requested tools and returns results, and stop limits (steps, tokens, time).
  • "Why not make everything an agent?" — Each extra model-controlled step adds cost, latency and a chance to go wrong. Fixed steps are easier to test and debug.