---
id: 12138
lang: en
title: "An AI agent is an LLM in a 20-line loop: where the complexity begins"
published_at: "2026-07-19 05:00:00"
source_name: "Habr AI"
source_url: "https://habr.com/ru/articles/1053862/?utm_campaign=1053862&utm_source=habrahabr&utm_medium=rss"
canonical_url: "https://news.hamidun.com/en/news/12138"
categories: ["llm"]
publisher: "AI News by Jemal Hamidun (news.hamidun.com)"
---

# An AI agent is an LLM in a 20-line loop: where the complexity begins

> **Краткая суть (BLUF):** "Build us an AI agent" now sounds about as simple as "build us a button." But the word "agent" covers three different things: a prompt, a chatbot, and an actual agent.  In an article on Habr, the author walks through the anatomy of an agent with code (at its core, an LLM in a 20-line loop), breaks down five ways to accidentally burn your agent budget, and offers a simple filter to figure out whether you need an agent at all.

"Build us an AI agent" now sounds as simple as "build us a button," yet in practice the word "agent" covers three distinct things: a prompt, a chatbot, and an actual agent. That's the argument from the author of a Habr article on the anatomy of AI agents.

## How an agent differs from a prompt and a chatbot

The author argues that the confusion around agents comes from using one name for three completely different things: a simple prompt, a conversational chatbot, and a full-fledged agent. The difference is fundamental. An agent doesn't just answer a question; it operates in a loop and decides on its own what to do next.

## What is the anatomy of an agent?

As the author describes it, a minimal AI agent is an LLM running in a loop, and you can implement it in literally twenty lines of code. That's where the real complexity begins: turning the minimal loop into a reliable system that doesn't waste budget and actually solves a real problem.

* The basic agent architecture is an LLM in a loop, roughly 20 lines of code
* The author identifies three distinct concepts that get lumped together as "agent": prompt, chatbot, agent
* The article breaks down five ways to accidentally burn budget on an agent
* It offers a simple filter for checking whether a task really needs an agent

## What it means

Demand for "AI agents" is outpacing understanding of what they actually are. As long as teams confuse prompts, chatbots, and agents, development budgets keep going to waste. A clear distinction between these concepts, plus a simple "do we need an agent at all" filter, offers a practical way to avoid overpaying for a buzzword.

---
- **Первоисточник:** [Habr AI](https://habr.com/ru/articles/1053862/?utm_campaign=1053862&utm_source=habrahabr&utm_medium=rss)
- **Каноническая ссылка:** https://news.hamidun.com/en/news/12138
- **Экосистема автора:** [Бесплатный интенсив по вайбкодингу — предзапись в Нике](https://t.me/vibecodeguidebot?start=agent_intensive_news_md) · [Nomad AI](https://nomadnet.ai) · [Telegram @jemal_hamidun](https://t.me/jemal_hamidun)
