Chapter 1: What is an AI Agent? / 第一章:什么是AI智能体?
Chapter 1: What is an AI Agent? / 第一章:什么是AI智能体?
Opening: The Question That Started Everything / 开篇:一切的起点
Imagine you wake up in the morning and say "Hey Siri, what's the weather today?" and your phone instantly tells you it will be sunny. Or picture this: you come home from school and your house has already adjusted the temperature to your favorite 22 degrees, the lights are on, and your favorite music is playing softly in the background. You didn't do any of these things yourself—yet somehow, they all happened automatically.
想象一下这样的场景:早晨醒来,你对着手机说"Siri,今天天气怎么样?",手机立刻告诉你今天阳光明媚。或者换一个场景:放学回家时,你的房间已经把温度调到了你最喜欢的22度,灯已经亮了,你最喜欢的音乐正在轻轻播放。你什么都没做——但这一切都自动发生了。
How does this work? How can devices and programs seem to "know" what you need before you even ask? This is exactly the question we will explore in this chapter.
这是怎么回事?为什么设备和程序似乎能"知道"你在开口之前就需要什么?这正是我们将在本章探讨的问题。
The key question we need to answer is this: What makes an AI agent different from a regular computer program? After all, both can follow instructions and perform tasks. But there is something special about AI agents that makes them feel more like helpful companions than mere tools. Let's discover what that special quality is.
我们需要回答的核心问题是:是什么让AI智能体不同于普通的计算机程序? 毕竟,两者都可以执行指令和完成任务。但AI智能体有一种特殊的品质,让它们感觉更像是乐于助人的伙伴,而不仅仅是工具。让我们一起发现这种特殊的品质是什么。
Section 1: Understanding the Concept of an "Agent" / 第一节:理解"智能体"的概念
What Does "Agent" Really Mean? / "智能体"到底是什么意思?
Before we can understand AI agents, we need to understand what an "agent" is in the first place. The word "agent" might sound complicated, but you've actually been using agents your entire life without realizing it.
在理解AI智能体之前,我们首先需要理解什么是"智能体"。这个词听起来可能很复杂,但实际上你一生都在使用智能体,只是没有意识到而已。
An agent is simply something that acts on your behalf. Think about it this way: when you use a food delivery app like DoorDash or Meituan, you're the one who wants food, but the app acts on your behalf. It finds restaurants, takes your order, tracks your driver, and makes sure your pizza arrives at your door. You didn't go to the restaurant or drive the car—the app did these things for you.
智能体(Agent) 简单来说就是代表你行事的东西。换个方式思考:当你使用外卖APP(如美国的DoorDash或中国的美团)订餐时,你是那个想要食物的人,但APP代表了你的行动。它帮你找餐厅、接收订单、追踪骑手、确保披萨送到你家门口。你没有去餐厅,也没有开车——APP帮你做了这些事情。
Let's look at another example: when you ask your parent to buy milk at the grocery store, your parent acts as your agent. They perceive the need (you need milk), make a decision (where to buy it, which brand to get), and take action (going to the store and bringing it back). Your parent is an agent because they act on your behalf to achieve a goal.
让我们再看另一个例子:当你让爸爸妈妈去超市买牛奶时,他们就是你的代理人。他们感知需求(你需要牛奶),做出决定(去哪里买、买什么牌子),然后采取行动(去超市并带回来)。你的父母就是智能体,因为他们代表你行动以达成目标。
The Three Pillars of Agency / 智能体的三根支柱
Every agent, whether human or artificial, has three essential characteristics:
每个智能体,无论是人类还是人工智能,都具有三个基本特征:
1. Perception (感知) — The agent senses or receives information about its environment. A grocery-shopping parent notices that you're out of milk. A delivery app receives your order request.
1. 感知(Perception) —— 智能体感知或接收关于其环境的信息。去超市购物的父母注意到你的牛奶喝完了。外卖APP接收你的订单请求。
2. Decision-Making (决策) — The agent processes the information and decides what to do. The parent thinks "I should go to the supermarket after work." The app calculates which restaurant is closest to you.
2. 决策(Decision-Making) —— 智能体处理信息并决定做什么。父母心想"我下班后应该去超市。"APP计算哪家餐厅离你最近。
3. Action (行动) — The agent takes steps to achieve its goal. The parent drives to the store, picks up the milk, and brings it home. The app sends your order to the restaurant and coordinates the delivery driver.
3. 行动(Action) —— 智能体采取步骤来实现目标。父母开车去超市、买了牛奶、带回家里。APP把你的订单发送给餐厅,并协调配送司机。
These three steps—perception, decision-making, and action—form a cycle that repeats over and over. An agent doesn't just do something once; it constantly senses its environment, makes decisions based on what it finds, and takes actions that might change that environment. Then it starts over again.
这三个步骤——感知、决策和行动——形成了一个不断重复的循环。智能体不会只做一次事情;它不断感知环境、根据发现做出决定、采取可能改变环境的行动。然后它又重新开始。
Why Regular Programs Aren't Agents / 为什么普通程序不是智能体
Now here's where things get interesting. You might be thinking: "My web browser shows me websites when I click links. Isn't that also perception, decision, and action?" That's a great question!
现在事情变得有趣了。你可能会想:"我的网络浏览器在我点击链接时显示网页。这不也是感知、决策和行动吗?"这是个很好的问题!
The difference lies in initiative and environment interaction. A regular computer program follows a fixed set of instructions that a human programmer wrote in advance. When you click a link in your browser, you're the one driving the action. The browser is just responding to your clicks—it doesn't decide on its own to show you something new based on what's happening in the world.
区别在于主动性和与环境的互动。普通计算机程序遵循人类程序员预先编写好的固定指令集。当你点击浏览器中的链接时,驱动动作的是你自己。浏览器只是在响应你的点击——它不会根据世界上发生的事情自己决定向你展示新内容。
An AI agent, on the other hand, can observe its environment, make decisions without being explicitly told what to do in every situation, and take actions to achieve goals that were set for it. It has a level of autonomy—the ability to act independently.
另一方面,AI智能体可以观察环境、在没有被明确告知每种情况下该怎么做的情况下做出决定,并采取行动来实现为其设定的目标。它具有一定的自主性——独立行动的能力。
Think about a chess computer program. You might tell it "play chess against me," and it follows rules to make moves. But it doesn't look outside the game board—it doesn't notice that you're getting frustrated, or that your little sister is trying to peek at the screen. It just processes the current board position and makes the best move it can calculate.
想一想象棋计算机程序。你可能告诉它"和我下棋",它遵循规则来走棋。但它不会看棋盘以外的东西——它不会注意到你正在变得沮丧,或者你的妹妹正试图偷看屏幕。它只是处理当前的棋盘位置,计算并走出它能想到的最优棋。
An AI agent is different. It can pay attention to what matters for its goals, ignore things that don't matter, and make decisions that weren't explicitly programmed by a human. This is what makes AI agents special.
AI智能体则不同。它可以关注对其目标重要的事情,忽略不重要的东西,并做出不是由人类明确编程的决定。这就是AI智能体的特别之处。
Section 2: Defining the AI Agent / 第二节:定义AI智能体
The Formal Definition / 正式定义
Now that we understand what an agent is, let's formalize what makes an AI agent different. An AI agent is a computer program that uses artificial intelligence techniques to perceive its environment, make decisions, and take actions autonomously to achieve specific goals.
现在我们理解了什么是智能体,让我们正式定义什么让AI智能体与众不同。AI智能体(AI Agent) 是使用人工智能技术来感知环境、做出决策、自主采取行动以实现特定目标的计算机程序。
Breaking this down into its components:
将其分解为各个组成部分:
1. Artificial Intelligence Techniques (人工智能技术) — AI agents don't just follow simple if-then rules like "if button pressed, then show webpage." Instead, they use machine learning, reasoning, planning, and other AI methods to handle complex situations. They can learn from experience and improve over time.
1. 人工智能技术 —— AI智能体不像"如果按下按钮,就显示网页"那样遵循简单的if-then规则。相反,它们使用机器学习、推理、规划和其他AI方法来处理复杂情况。它们可以从经验中学习并随着时间推移而改进。
2. Environmental Perception (环境感知) — AI agents have "sensors" that let them gather information. For a robot, sensors might include cameras, microphones, temperature sensors, or touch sensors. For a software agent, sensors might be APIs that receive data, text input, or data streams from the internet.
2. 环境感知 —— AI智能体有"传感器"来收集信息。对于机器人来说,传感器可能包括摄像头、麦克风、温度传感器或触觉传感器。对于软件智能体来说,传感器可能是接收数据的API、文本输入或来自互联网的数据流。
3. Autonomous Decision-Making (自主决策) — Unlike traditional programs, AI agents can decide what to do without step-by-step human instructions. They reason about their situation, consider different options, and choose actions that seem most likely to achieve their goals.
3. 自主决策 —— 与传统程序不同,AI智能体可以在没有人类逐步指导的情况下决定做什么。它们推理自己的处境,考虑不同的选项,选择看起来最有可能实现目标的行动。
4. Goal-Directed Behavior (目标导向行为) — Every AI agent is working toward something. This goal might be simple (clean the floor), complex (help a user manage their calendar), or abstract (maximize user satisfaction). The goal gives the agent a purpose and a