Agent
One-Sentence Definition
An Agent is an AI executor that keeps moving toward a goal and can use tools along the way. It turns AI from "only talking" into "actually doing work."
Intuitive Analogies
Analogy 1: A private assistant
The model is like a smart advisor, but it does not directly check tickets, send emails, query databases, or edit files. The agent is like the assistant next to that advisor:
- it receives your goal
- it calls tools when needed
- it brings results back to the model
- it continues until the task is finished
The intelligence mainly comes from the model. The execution layer comes from the agent system and tools.
Analogy 2: A LEGO robot
Agent = brain (LLM) + hands and feet (tools) + control loopThe brain decides. The tools act. The loop keeps the task moving.
The Core Idea: The ReAct Loop
Many agents follow a pattern like this:
- reason about the next step
- act by calling a tool
- observe the result
- reason again with the new information
This keeps repeating until the task is complete.
A Simple Example
If you say:
Find the cheapest high-speed train from Beijing to Shanghai tomorrow
and send the result to my colleague.An agent might:
- decide to search train options
- call the search tool
- compare the results
- call an email or messaging tool
- return a completion message to you
That is not ordinary chat. It is goal-driven execution.
What an Agent Usually Contains
- an
LLMreasoning module - a tool-calling layer
- a planning layer
- a memory layer
- a loop-control layer
Agent vs Workflow
Workflowis more fixedAgentmakes more dynamic choices at runtime
Stable repeatable tasks often fit workflow better. More variable tasks benefit more from agent behavior.
Why Agents Consume So Many Tokens
Agents do not answer only once. They keep looping. Each round of reasoning, tool use, and observation can trigger another model call and add more context.
That is why systems also need:
Memoryfor compressionSubAgentfor decompositionWorkflowfor stabilization
Common Forms of Agents
- online AI that searches before answering
- coding assistants that read projects and edit files
- enterprise agents connected to knowledge bases and systems
- no-code agent builders
Common Business Uses
- customer support
- sales assistance
- analytics assistants
- content operations
- HR automation
- personal automation
What You Need to Remember
- the key difference is not better chatting, but better execution
- an agent keeps pushing toward a goal
- once you understand agents,
Function CallingandMCPbecome easier to understand
Sources
- Anthropic: Building effective agents
- LangGraph: Workflows and agents