TL;DRAn AI agent is an LLM that can take actions through tools — not just produce text.
An agent wraps an LLM in a loop where it can decide to call tools (search, code execution, APIs, file edits), observe results, and continue until a goal is met. This turns a text generator into something that does things — books a trip, fixes a bug, researches a topic. The capability is powerful but raises reliability and safety stakes: an agent acts on the world, so errors have consequences.
Key points
LLM + a loop that can call tools
Decide → act → observe → continue to a goal
Turns generation into action
Higher reliability/safety stakes
Common mistakes
Giving agents powerful tools without guardrails
Unbounded loops with no stop condition
Trusting agent actions without verification
Try it: Explain the difference between a chatbot and an agent.
Example code
<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre>chatbot: text in → text out
agent: goal → {think, call tool, observe} loop → result
acts on the world</pre></body></html>