Which component is 'the agent' in an LLM-based agent system?
The agent is the whole system: the LLM decides actions, but the runtime executes the tools, manages state, and enforces limits. The model itself runs no code.
Think of a film director and a film crew. The director decides what should happen next, calls out the shot, and reacts to what they see on the monitor. But the director does not personally move the camera, adjust the lights, or roll the film. The crew does that. The director without a crew is just someone talking; the crew without a director has nobody deciding what to shoot. The finished scene is the whole production working together. An LLM agent is the same. The model is the director: it reads the situation and decides the next move. The runtime is the crew: it actually calls the tool, runs the code, saves the result, and stops the shoot when the budget runs out. Neither one alone is the agent. The agent is the director and crew, acting as a single system.
Detailed answer & concept explanation~8 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
State that the agent is the whole system, then separate the LLM as the decision maker from the runtime as the executor. Explain what the model emits, what the runtime owns, where state lives, and why the split is a security and reliability boundary.
Real products, models, and research that use this idea.
- Anthropic's computer use feature: Claude Opus 4.7 decides the next click or keystroke, but the harness takes the screenshot, executes the action on the desktop, and loops the result back.
- LangGraph runs the loop as a typed state graph. The model node decides; the framework executes tools, persists state, and enforces the recursion limit that caps step count.
- The OpenAI and Anthropic SDKs return a tool-use block from the model that your own code must execute. The SDK never runs the function for you; the runtime you write does.
- Cursor and Cline coding agents: GPT-5.5 or Claude proposes a file edit, but the editor runtime applies the diff, runs the tests, and feeds the results back into the next turn.
What an interviewer would ask next. Try answering before peeking at the approach.
QWhy is the brain and runtime split a useful security boundary, not just a tidy abstraction?
QIf the model is stateless across calls, how does an agent remember what it did three turns ago?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Calling the LLM alone the agent. The model only emits a tool-use request as text. The runtime is what actually invokes the tool, manages state, and enforces budgets.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.