各个概念是什么
AI 模型
AI 模型 是经过学习的数学组件。它接收输入并生成输出,例如预测、生成的文本或请求的工具调用。模型本身并不提供聊天界面、保留应用状态或执行外部操作。这些属于模型周围系统的职责。 is the learned mathematical component. It receives input and produces output, such as a prediction, generated text, or a requested tool call. The model does not, by itself, provide a chat screen, retain application state, or execute an external action. Those are system responsibilities around the model.
AI 聊天机器人
AI 聊天机器人 是一种主要界面为对话的应用。它接收消息并返回对话式响应。其后端可能是一次模型调用、固定工作流、agent,或这些方式的组合。“聊天机器人”说明用户如何与产品交互,而不说明其后端具有多高的自主性。 is an application whose main interface is conversation. It accepts messages and returns conversational responses. Its backend might be one model call, a fixed workflow, an agent, or a mixture of those. “Chatbot” tells you how a user interacts with the product, not how autonomous its backend is.
AI harness
AI harness 是让模型能够在应用中使用的软件和配置。它可以构建提示词、加载相关上下文、提供工具、执行工具请求、保留状态、流式输出、实施权限控制,并决定何时必须停止运行。 is the software and configuration that makes a model usable inside an application. It can build prompts, load relevant context, expose tools, execute tool requests, preserve state, stream output, enforce permissions, and decide when a run must stop.
这个术语的含义仍在逐渐明确。有些开发者专门用“harness”指模型与工具之间的循环;另一些开发者则把周围几乎所有应用基础设施都包括在内。在这两种用法中,harness 都位于经过训练的模型之外。
AI agent
AI agent 是一种通过让模型选择行动、观察结果并选择下一步做法来追求目标的系统。harness 负责运行并约束这一过程。agent 通常会使用工具,并且可以跨越多个步骤工作,而不必要求用户指导每一步。 is a system that pursues a goal by letting a model choose actions, observe results, and choose what to do next. The harness runs and constrains that process. An agent often uses tools and may work across several steps without asking the user to direct every one.
不存在普遍适用的自主性阈值。一个有用的实际判断标准是控制流:如果模型能够根据中间结果调整下一步,那么该系统就具有 agent 特征。如果代码预先固定了完整路径,那么即使工作流调用了模型多次,也更适合称为工作流。
真正的区别
每个术语回答的是不同的问题:
- 模型: 哪个经过学习的组件会把输入转换为输出?
- 聊天机器人: 人在哪里与系统进行对话?
- Harness: 哪些软件会围绕模型提供上下文、执行操作并实施控制?
- Agent: 哪个系统会为了实现目标而选择一系列行动?
| Term | Kind of thing | Main responsibility | Can it affect an external system by itself? |
|---|---|---|---|
| Model | Learned component | Produce an output from an input | No. It can request or describe an action, but software must execute it. |
| Chatbot | Application and interface | Conduct a conversation | It depends on its backend. A simple chatbot only responds; an agentic chatbot can act. |
| Harness | Software control and execution layer | Prepare model calls, run allowed tools, manage state, and enforce rules | It performs configured operations, but does not supply the model’s judgment or goal by itself. |
| Agent | Goal-directed system | Select and perform steps based on observations | Yes, within the tools, permissions, and approval rules its harness provides. |
这些类别可以嵌套。聊天机器人可以使用 harness 调用模型。如果模型能够引导工具循环朝着目标推进,那么同一个产品也包含一个 agent。另一方面,agent 也可以通过 API 请求、计划任务或事件运行,完全不需要聊天机器人。
一次请求中的四种角色
假设你输入:“把我的配送改到周五,并确认这次更改。”
聊天机器人 接收消息并显示响应。模型 解读请求,并可能判断需要查询订单。harness 构建模型输入,提供订单查询工具,验证请求的调用,执行该调用,并返回结果。 interprets the request and might decide that it needs to look up an order. The harness constructs the model input, offers an order lookup tool, validates the requested call, runs it, and returns the result.
如果周五不可用,agent 可以进行调整。它可能检查其他日期,请你选择一个日期,等待你的回复,在获得批准后更新配送时间,然后验证新的日期。模型根据观察结果选择这些后续步骤。harness 负责实际调用配送系统并应用权限规则。 can adjust. It might inspect other dates, ask you to choose one, wait for your reply, update the delivery after approval, and then verify the new date. The model chooses those next steps from the observations. The harness is what actually calls the delivery system and applies the permission rules.
非 agent 式聊天机器人仍然可以处理这一请求。它可能遵循硬编码的对话表单,或者简单说明你可以如何自行更改日期。仅凭是否采用对话界面,无法判断系统是否具有 agent 能力。
每种区分何时重要
模型何时重要
当你比较生成输出的质量和形式时,应关注模型:它接受哪些输入、遵循指令的可靠程度,或它在评估中的表现。更换模型可以改进或改变决策,而不改变产品界面或执行设计。
聊天机器人何时重要
当问题涉及对话可用性时,应关注聊天机器人。消息历史、轮次交互、澄清、语气、无障碍性以及转交人工处理,都属于聊天机器人的关注点。即使后端能力很强,如果交互令人困惑,聊天机器人仍可能设计得很差。
Harness 何时重要
当问题涉及可靠性、上下文、工具、状态、安全或可观测性时,应关注 harness。模型不会仅仅因为被指示这样做,就能自行实施权限控制。Harness 必须限制可用操作、验证调用、要求批准、记录结果,并停止不安全或失控的执行。
同一个模型在两个 harness 下的表现可能截然不同,因为它看到的上下文不同、获得的工具不同,以及执行操作后收到的反馈不同。
Agent 何时重要
当任务需要选择并修订行动路径,而不是生成一次响应时,应关注 agent。对于中间结果会决定下一步的开放式工作,agent 很有用。但它也会引入更多失败方式:早期的错误行动可能改变后续发生的事情,因此工具限制、验证和人工批准都很重要。
人们常见的混淆
聊天机器人不等同于其模型
聊天机器人是产品界面和应用行为。模型只是其背后的一个组件。一个聊天机器人可以在多个模型之间路由,而一个模型也可以为许多互不相关的产品提供支持。
聊天窗口不能证明存在 agent
一次模型响应就可以显示在聊天气泡中。反过来,agent 也可以在后台运行,完全没有对话。聊天描述的是界面;agent 能力描述的是系统如何推进工作。
仅有工具访问权限并不能决定是否存在 agent
固定程序可以在每次请求后都调用同一个工具。这属于自动化,但并不意味着模型在引导这一过程。更有力的判断信号是:模型输出是否决定下一步执行哪个行动,以及观察结果是否能够改变计划。
Harness 不是模型内部的智能
Harness 可能包含大量逻辑,但它不会因此成为训练模型的一部分。它决定模型能够看到和执行什么,执行请求,并应用确定性的控制。保持这一边界清晰,有助于诊断故障:糟糕的决策可能是模型问题,而错误的工具结果或缺失的批准检查则是系统问题。
“Agent 式聊天机器人”并不矛盾
一个产品可以同时属于两者。它是聊天机器人,因为对话是其界面;当其后端能够朝着用户目标选择并执行多个步骤时,它就具有 agent 特征。
各部分如何组合
一种常见的安排如下:
user → chatbot surface → harness → model
↕
tools and data当模型利用工具结果来选择朝着目标推进的后续行动时,模型、harness 和可用工具共同构成一个 agent。聊天机器人仍然只是其上层的可选界面。
如需完整介绍,请阅读 AI 模型、AI 聊天机器人、AI harness 和 AI agent 的组件页面。然后继续阅读《LLM 中的工具使用是什么?》,了解模型提出行动与 harness 执行行动之间的边界。, and AI agents. Continue to What Is Tool Use in LLMs? for the boundary between a model proposing an action and the harness executing it.