An agent is an LLM in a loop with tools: it observes, reasons, acts, reads results, and repeats until it produces a final answer or a stopping condition fires.
Imagine giving a very fast intern a goal, a phone, a calculator, and a notepad. The intern reads the goal, decides one next step, picks up a tool to do that step, writes down what they learned, and then looks at the notepad again to decide what to do next. They keep going until they have an answer or they run out of time. An AI agent works the same way. The language model is the intern doing the thinking. The runtime is the office around the intern: it actually picks up the phone, runs the calculator, writes things down on the notepad, and watches the clock. The two together, taking turns over and over, are what people mean when they say agent.
Detailed answer & concept explanation~7 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.
5 min: state the one-sentence definition, unpack the observe, reason, act, repeat loop, separate the model's role from the runtime's role, contrast against a one-shot completion and a fixed chain, and name two production runtimes.
Real products, models, and research that use this idea.
- Anthropic's computer use feature: Claude Opus 4.7 decides the next click or keystroke, the harness takes the screenshot and executes the action, then loops the new screen back in.
- Cursor and Cline coding agents: the model proposes an edit, the editor runtime applies the diff and runs tests, and the test output becomes the next observation.
- LangGraph state graphs and the OpenAI Agents SDK are runtimes that drive this observe reason act loop in production deployments.
- Devin and similar autonomous coding agents run the same loop across hours, with tool calls to a sandboxed shell, a browser, and a file system.
What an interviewer would ask next. Try answering before peeking at the approach.
QIf the model only emits text, what actually invokes a tool and how does that result get back into the prompt?
QHow is an agent different from a LangChain-style chain that calls the LLM several times?
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 a single LLM completion an agent. A chatbot answer is not an agent; an agent requires a loop, tools, and a runtime that drives the loop until a stopping condition fires.
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.