惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

C
Cisco Blogs
The Cloudflare Blog
云风的 BLOG
云风的 BLOG
Recorded Future
Recorded Future
F
Fortinet All Blogs
Microsoft Azure Blog
Microsoft Azure Blog
U
Unit 42
博客园 - 三生石上(FineUI控件)
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
N
Netflix TechBlog - Medium
C
Check Point Blog
Security Latest
Security Latest
MongoDB | Blog
MongoDB | Blog
P
Proofpoint News Feed
J
Java Code Geeks
The GitHub Blog
The GitHub Blog
V
Vulnerabilities – Threatpost
阮一峰的网络日志
阮一峰的网络日志
P
Palo Alto Networks Blog
C
CERT Recently Published Vulnerability Notes
F
Full Disclosure
C
Cyber Attacks, Cyber Crime and Cyber Security
雷峰网
雷峰网
T
The Blog of Author Tim Ferriss
T
Threat Research - Cisco Blogs
Cisco Talos Blog
Cisco Talos Blog
V
V2EX
Latest news
Latest news
Engineering at Meta
Engineering at Meta
A
About on SuperTechFans
Cyberwarzone
Cyberwarzone
The Hacker News
The Hacker News
A
Arctic Wolf
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
NISL@THU
NISL@THU
腾讯CDC
P
Privacy & Cybersecurity Law Blog
G
GRAHAM CLULEY
罗磊的独立博客
S
Schneier on Security
C
Cybersecurity and Infrastructure Security Agency CISA
博客园 - 司徒正美
K
Kaspersky official blog
L
Lohrmann on Cybersecurity
C
CXSECURITY Database RSS Feed - CXSecurity.com
月光博客
月光博客
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
Project Zero
Project Zero
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
I
InfoQ

博客园 - 悠哉大斌

AI Agent 安全沙箱技术对比:E2B、Cube Sandbox 与 Docker Sandboxes linux 升级 claude code的坑 debian(WSL) apt 代理配置 linux内核之Namespaces、Cgroups、Capabilities、Seccomp和Landlock 大语言模型推理中的隐藏瓶颈及其解决方法 Docker Sandboxes 技术是什么,和docker容器有什么区别 什么是 Docker Agent以及一个Docker Agent示例 windows wsl 安装 Temurin® JDK claude Code 和 codex 作为编程代理,前者使用typescript开发,后者使用rust,他们的决策依据是什么 Java 并发编程发展史与 java.util.concurrent 全景解析 LLM 真的改变了编码风格吗? 如果人工智能会犯错且不精确,为什么它正在改变世界? Python 的协程模型和 JavaScript 的 async/await python闭包和function.__closure__特殊属性 python 的 dunder name和 sunder name 基于nodejs设计REST API的知名开源框架 windows上使用node-oracledb Thick 模式连接 Oracle 11g Claude Code CLI连接 DeepSeek V4模型后调用报400错误 python里对象(object)到底是什么 Python 泛型演变史 Python 类型别名的演变 Python 类型提示的演变史 PEP 593 新增的Annotated 类型 Alibaba AgentScope 和 microsoft agent framework 详细对比分析 spring AI Alibaba Agent Framework 和 agentscope有什么区别和联系 AI Agent协作模式以及主流开源框架对协作模式的支持 Tailscale 是如何接管 DNS 的? 使用rust编写typescript编译器的难点在什么地方,哪些数据结构是rust不擅长的? TypeScript/JavaScript 中的异步迭代语句 js中的生成器函数 Tailscale Serve and Funnel openclaw gateway的网络绑定模式 websocket协议和http协议有何依赖关系? MCP通信的双方是谁? claude code MCP 安装范围 如何在wsl2环境下给claude code cli 配置 playwright-mcp wsl的网络模式有哪几种,有哪些区别? AI Agent memory是什么? ai agent skills是什么? Go测试生态系统工具与最佳实践深度调研(聚焦认证授权系统) 线性代数中常见矩阵类型的概念关系思维导图 三种主流授权策略
Agent = Model + Harness
悠哉大斌 · 2026-03-24 · via 博客园 - 悠哉大斌

Agent = Model + Harness

这个公式是 LangChain 工程师对 Agent 本质的一种精炼抽象,把一个复杂的系统拆解成两个正交的关注点。


两个核心组件

🧠 Model(模型)

就是 LLM 本身,负责推理与决策

  • 理解用户意图
  • 规划下一步行动(调用哪个工具、传什么参数)
  • 综合工具返回结果,形成最终答案

Model 是 Agent 的"大脑",但它本身是无状态、无执行能力的 —— 只能接收 token、输出 token。


🔧 Harness(框架/脚手架)

Harness 是套在 Model 外面的执行基础设施,负责把模型的"想法"变成"行动":

Harness 的职责 具体示例
工具注册与调用 搜索、代码执行、数据库查询
状态与记忆管理 对话历史、中间变量、向量记忆
循环控制 ReAct 循环、最大步数限制、终止条件
Prompt 工程 System prompt、Few-shot 示例注入
错误处理与重试 工具调用失败后如何恢复
多 Agent 编排 调度子 Agent、汇总结果

为什么这个拆分有价值?

┌─────────────────────────────────────┐
│              Harness                │
│  ┌─────────┐    ┌─────────────────┐ │
│  │  Tools  │    │  Memory/State   │ │
│  └────┬────┘    └────────┬────────┘ │
│       │                  │          │
│  ┌────▼──────────────────▼────────┐ │
│  │           Model (LLM)          │ │
│  │   推理 → 决策 → 输出 Action    │ │
│  └────────────────────────────────┘ │
│       │                             │
│  ┌────▼────────────────────────┐    │
│  │   Loop Control / Planner    │    │
│  └─────────────────────────────┘    │
└─────────────────────────────────────┘

关注点分离:模型能力和执行基础设施可以独立演进

  • 换一个更强的模型(GPT-4 → Claude 3.7),Harness 不用改
  • 改造工具集或记忆策略,不影响模型本身

解释了 Agent 的上限和瓶颈

  • Agent 表现差 → 先问是 Model 不够聪明,还是 Harness 设计有缺陷
  • 很多"Agent 失败"其实是 Harness 没做好(工具描述不清、循环没有退出条件等)

一个直觉类比

Model = 一个聪明的顾问,只靠大脑思考,但手脚被绑着

Harness = 给顾问配备的办公室:电话、电脑、秘书、会议室、日历……

Agent = 顾问 + 完整的办公室,才能真正把事情做成


实践启示

在构建 Agent 时,这个框架提示你要分别优化两侧:

  • Model 侧:选择推理能力强、工具调用准确的模型;优化 Prompt 引导模型输出结构化 Action
  • Harness 侧:工具描述要精准、记忆要高效检索、循环要有防无限递归机制、错误要可恢复

这也是为什么很多 Agent 框架(LangGraph、AutoGen、CrewAI)的核心竞争力都在 Harness 的设计上,而不是模型本身。