What Is an AI Agent? One Relatable Example That Explains It All

AI Agents work by using rules and prompts to drive repeated LLM calls — not autonomous intelligence.
Using the analogy of asking a roommate to attend class on your behalf, this article breaks down the core logic of AI Agents: they are not independent intelligences that transcend LLMs, but execution frameworks that decompose complex goals into sub-tasks and call LLMs at each step. The key insight is a sober correction to Agent hype — current Agents rely on human-designed rules (carefully written prompts) for stability, not genuine autonomous reasoning. Because LLMs hallucinate and errors compound across chained calls, hardcoding critical steps as rules is today's safest and most practical Agent design approach.
Starting with "Attend Class for Me": What Is an Agent, Really?
Mention AI Agent to most people and they immediately picture something mysterious — a new kind of entity that has transcended large language models and thinks entirely on its own. But strip away the jargon, and an Agent can be explained with the most ordinary of scenarios.
Bilibili creator Tang Yudi skipped the slides in this lesson and used an everyday example instead: one morning you can't drag yourself out of bed, so you tell your roommate, "Hey, go to class for me today." He agrees. That seemingly simple request actually contains the entire logic of what an Agent is.
For your roommate to truly "attend class for you," he needs to complete a whole chain of actions: answer "here" when the professor calls roll; hand in your assignment when it's due; jot down the key points from the lecture; and — going the extra mile — reason that you're probably back in the dorm sleeping or gaming at noon, so he might as well grab lunch for you on his way back.
You issued a single command — "go to class for me" — but that command doesn't execute in one shot. It has to be broken down into a series of sub-tasks, each carried out individually. That is the core of an Agent: receive a goal, decompose it into multiple steps, and complete them one by one.
The Relationship Between Agents and LLMs: Not a Replacement, but Deeper Utilization
Some people frame Agents and large language models as opposites, as though an Agent is something more advanced that supersedes LLMs. Tang Yudi directly corrects this misconception: an Agent doesn't operate outside of LLMs — quite the opposite, it makes far more intensive use of them.
A typical LLM interaction is one question, one answer — you ask, it responds, back and forth, each exchange relatively independent. An Agent works differently:
- Step 1: Understand your command
- Step 2: Break the command into sub-tasks (what to do first, what to do next…)
- Step 3: Execute each sub-task in sequence

Here's the key question: how does an Agent actually "decompose tasks"? Did it grow a brain and get genuinely smarter? The answer is no. Inside an Agent, every decomposition and every decision is made by calling a large language model.
For example: the system receives the command "attend class for Tang Yudi," then bundles Tang Yudi's basic profile and personal context together with that command into a prompt, hands it to the LLM, and the model automatically breaks it down into a set of sub-commands. When it comes time to execute — say, "class is in session right now, what should I do?" — it queries the LLM again and gets back decisions like "raise your hand when roll is called," "take notes while you're at it," and "pick up some food on the way back."
In other words, every decision an Agent makes, every task it handles, involves a large volume of back-and-forth with an LLM — repeatedly asking: "What is my current environment? What command have I received? How should I proceed?"

This pattern of repeatedly calling an LLM is commonly known in the field as the ReAct paradigm (Reasoning + Acting) — the model both reasons and acts at each step. Every time the Agent calls the LLM, it packages the current environment state, the history of past actions, and new observations into the prompt, and the model outputs the next action based on all of that. This means the prompt grows longer as the task progresses, and token consumption compounds. That's one of the major cost-control challenges in Agent applications: a goal that looks simple on the surface can trigger dozens of LLM calls under the hood.
Don't Mythologize Agents: What Really Makes Them Reliable Is "Rules"
The most valuable insight in this lesson is a calm, grounded pushback against the current Agent hype.
Countless talks, frameworks, and projects describe Agents as almost magical — capable of autonomous analysis, autonomous understanding, autonomous self-improvement. But Tang Yudi is blunt about it: as of today, Agents are nowhere near the level of truly understanding every human action. The reason is straightforward — large language models hallucinate, and their outputs are not reliably stable.

So what keeps a real-world Agent running reliably? The answer is rules.
Rules mean hardcoding the critical steps of a process. In the "attend class for me" example, you explicitly define: "you must check in for me," "you must do this," "you must do that" — giving it clear instructions to act as a perfect proxy. And these rules are set, in practice, by writing prompts.
Tang Yudi offers a highly practical approach here: package the task objective, the personal information of the person being represented, and their behavioral tendencies (e.g., "Tang Yudi doesn't enjoy attending class, but always reviews his notes before exams") into a prompt, hand it to the LLM, and get back specific actions for each step.

He also uses an analogy closer to real engineering practice: having an Agent write code is just like a real software team — a product manager (PM) first defines the workflow step by step, then specific features are handed off to the appropriate developers. The whole thing follows a complete, deliberately designed process, rather than letting the AI freestyle. Current Agents are far from having genuine independent thought — without rule constraints, the results tend to be poor. This is precisely where today's Agent technology hits its limits.
LLM "hallucination" refers to models outputting factually incorrect or entirely fabricated content with high apparent confidence. The root cause is that LLMs are fundamentally probability-based text prediction systems, not true knowledge retrieval or logical reasoning engines. In a single Q&A exchange, a hallucination produces one wrong answer at worst. But in an Agent's chain of calls, a hallucination at one step gets treated as fact by every subsequent step — errors propagate and amplify along the pipeline, potentially causing the entire task to fail or even produce harmful outputs. This is exactly why, in engineering practice, hardcoding critical decision points as rules — rather than fully trusting the model to decide autonomously — is currently the most mainstream and most reliable Agent design strategy.
The Agent Working Paradigm in One Line
Distilling this lesson down to a single throughline, an Agent's operation can be summarized as:
Receive a goal → Break it into sub-tasks → For each sub-task, apply your designed rules (prompts) → Call the LLM → Get the desired output
Understanding Agents doesn't require memorizing a perfect definition. It's a highly flexible concept — what you want it to do for you, how you design its workflow, is entirely up to you. Every person's idea of an intelligent agent can look different; there's no need to be bound by a single algorithmic framework.
For anyone looking to get started with Agent development, this foundational understanding matters enormously: don't be misled by marketing around "autonomous intelligence." Start by learning to decompose complex tasks into clear workflows, then use prompts to set rules for each step, letting the LLM perform within a controlled structure. An Agent's power comes from your ability to design the process — not from any mysterious "smartness" it conjures on its own.
Related articles

Apple HomeView Hands-On Review: Is the $300 Smart Home Hub Worth It?
Apple HomeView hands-on: a $300 smart home hub with facial recognition for quick account switching, but no App Store or voice recognition. Is the wall-mounted version worth it? Should you buy the first generation?

Meta Muse Wonder Launch: What It Means for Meta's Return to the Frontier AI Race
Meta releases Muse Wonder and WonderFull, benchmarks reach the frontier, community feedback is polarized. An in-depth look at Meta's return to the frontier AI race, its personal agent strategy, and Zuckerberg's different path.

Apple Home Smart Home Lineup Leaked: LG and Schneider Team Up, UWB Door Lock on Board
Apple Home ecosystem gains new LG and Schneider devices: UWB smart lock with proximity unlock, 2.5K dual-camera doorbell, privacy indoor camera, and AirPods-like seamless pairing.