Skip to content
AI AgentAgentic AIMCPLLMGüvenlik

How AI Agents Work: An Engineer's View of Agentic AI

September 26, 2026 · 26 min read

Contents

Last verified: 2026-09-26

Frequently Asked Questions

What is the difference between an AI agent and a chatbot?

A chatbot produces text; an agent calls tools and decides its own next step from the results. The difference is the loop: an agent continues until the goal is met or a stopping condition fires. If you can draw the flow in advance, you need a fixed chain, not an agent.

How do I stop an agent looping forever?

Fit at least four brakes: a step limit, a budget limit, a time limit and repeat detection. The fourth is the most skipped and most useful — halt when the last three tool calls share a name and argument hash. And when a stopping condition fires, tell the user honestly; never present a half-finished task as complete.

How do I limit what an agent is allowed to do?

Authorisation belongs in the tool layer, checked against the session identity. Writing "only show their own data" in the prompt is a wish, not a control. Separate read tools from write tools, gate irreversible operations behind human approval, and run the agent as its own service account with least privilege.

Why are agents so expensive?

Because context grows at every step, cost scales roughly quadratically rather than linearly: at step five the model re-reads all four earlier observations. The most effective optimisation is reducing step count — narrowing tasks, making tools more capable and trimming tool results.

How should I roll an agent out to production?

Gradually. Shadow mode first: the agent runs and logs decisions but performs no actions. Then suggestion mode (a human executes), then narrow autonomy on reversible operations, and finally broad autonomy with an approval threshold. Shadow mode is the most valuable rung and the one most often skipped.

Reading isn't enough — do it.

Practice these topics in an interactive terminal in your browser.