Skip to content

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."

Step by stepThe agent loop: a real runModel:qwen3:8b (local Ollama)

messages = [ ]

  1. Call the model
  2. Execute the tool
  3. Put the result back into the conversation
  4. 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 blockWhat it solvesWhich section
Function callingLets the model "request" to execute an actionLetting the model call a function
LoopLets it do multiple steps in a row until completionWriting the Agent loop
ToolsLets it actually touch files, commands, and web pagesGiving it real tools
MemoryLets it remember what it has done beforeMemory
Skills and protocolsReuse 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.

gaodong.aiAboutPrivacyContact

Independent tutorials, not affiliated with any product mentioned. Product names and trademarks belong to their owners. Check official pages for prices and policies.