KatInterview

Anatomy of a Tool-Using LLM Agent and Its Control Flow

Machine LearningModel answer
HardModel answerMachine Learningllm-agentstool-usememory

Last updated

Describe the building blocks of a language-model agent, what each is responsible for, and how they cooperate across a multi-step task with safety and evaluation in mind.

You are asked to explain how an agent built around a large language model is put together.

  1. List the main components of such an agent.
  2. For each one, say what it is responsible for and what design choices matter.
  3. Walk through a concrete multi-step task and show how the components hand work to one another from the initial request to the final answer.

State your assumptions up front. For example, say whether the agent runs fully autonomously or with a person approving risky actions, and whether you are describing a single agent or several cooperating ones. Mention how you would keep the agent safe and how you would measure whether it works.

Hints

Hint 1

Start from the loop: the agent observes, decides, acts and observes again. Then ask which parts of the system support each stage of that loop.

Hint 2

Separate what lives inside the model call (reasoning, choosing an action) from what lives outside it (tool execution, storage, permission checks, budgets).

Hint 3

Pick one concrete task, such as researching a question and writing a short report, and trace every component it touches, including what happens when a tool call fails.

Hint 4

Do not forget the unglamorous parts: stopping conditions, cost and step limits, logging, and an evaluation set with both final-answer and trajectory metrics.