What exactly is an Agent
After reading this section, you'll be able to define an Agent in one sentence, distinguish Agents from "workflows," and know the building blocks this course will assemble next.
Starting from assigning tasks
You ask a new assistant to "turn this week's work logs into a weekly report."
- An ordinary chatbot is like an assistant who can only talk to you through a door: you have to copy all the records over to him, and he reads the finished report back to you. He can't touch your files.
- A workflow is like a rigidly scripted manual: step one, open folder A; step two, copy each file; step three, apply the template. Every step is defined by you in advance, and it gets stuck when something isn't covered by the manual.
- An Agent is like an assistant who can act on his own: he checks what's in the folder himself, opens and reads the files one by one, switches paths when he finds one is wrong, and finally writes the report—asking you before saving the file. What to do and in what order is decided by him as he goes.
A one-sentence definition
Anthropic's formulation in "Building effective agents":
- Workflow: orchestrating large models and tools through pre-written code paths.
- Agent: a large model dynamically directing its own process and tool usage.
It also puts it more plainly: an Agent is typically "just a large model using tools in a loop, based on environmental feedback."
messages = [ ]
- Call the model
- Execute the tool
- Put the result back into the conversation
- No tool calls → end
第 0 轮Wait for user input
The above is exactly such a loop: the model requests a tool → the program executes it → the result (including errors) is returned to the model → the model decides the next step.
When you shouldn't use an Agent
The same article stresses repeatedly: find the simplest solution first, and add complexity only when needed. For many applications, doing a single model call well is enough.
Look it upMy task is...
Click one to see.
What you actually need to learn for Agent development
Many people search for "what to learn for Agent development." In the order of this course, it comes down to five building blocks:
| Building block | What it solves | Which section |
|---|---|---|
| Function calling | Lets the model "request" to execute an action | Letting the model call a function |
| Loop | Lets it do multiple steps in a row until completion | Writing the Agent loop |
| Tools | Lets it actually touch files, commands, and web pages | Giving it real tools |
| Memory | Lets it remember what it has done before | Memory |
| Skills and protocols | Reuse practices and tools written by others (Skills, MCP) | Skills, MCP |
Above that are engineering issues: framework selection, security, debugging and evaluation, covered in the final chapter.
The article gives three principles for Agent design worth remembering: keep it simple; make the planning process transparent; carefully design the interfaces between the Agent and its tools. It also mentions that on a coding benchmark, they spent more time optimizing tools than optimizing the overall prompt—for example, changing a tool to require absolute paths to prevent the model from writing them wrong.
Quiz time“Every day at 9 a.m., summarize new rows in spreadsheet A and post them to the group” — what is this best built as?
Check yourself
- I can define an Agent in one sentence: a large model using tools in a loop based on feedback
- I can distinguish workflows from Agents, and say when you shouldn't use an Agent
- I know the five building blocks this course will assemble
Next section: Setting up the environment and model.