AI Skills AI技能 19h ago Updated 18h ago 更新于 18小时前 46

You've just understood Agents. Now meet the Harness. 你刚刚理解了Agent,现在来认识Harness吧

A "Harness" is the engineering and infrastructural scaffolding around an LLM that enables agents to operate effectively, distinct from the agent itself which is the reasoning and decision-making entity Harnesses solve three core engineering challenges: context degradation management, security sandboxing, and generalizability through decoupling business logic from code Context management techniques include Context Compaction (summarization), Progressive Loading (lazy loading of details), and Cont Harness是围绕LLM的工程基础设施层,负责上下文管理、工具执行、状态维护和边界控制,与作为决策实体的Agent形成互补而非替代关系 现代Harness通过Context Compaction(上下文压缩)、Progressive Loading(渐进加载)和Context Isolation(上下文隔离)三大技术解决长对话中的上下文退化问题 安全沙箱通过文件系统隔离、网络控制和计算约束三层边界,确保Agent在执行危险操作(如命令行)时不会破坏系统或泄露数据 Harness将工程复杂度与业务逻辑解耦,领域专家可通过markdown文件定义"技能"和"插件",无需编写代码即可定制Agent

65
Hot 热度
70
Quality 质量
60
Impact 影响力

Analysis 深度分析

TL;DR

  • A "Harness" is the engineering and infrastructural scaffolding around an LLM that enables agents to operate effectively, distinct from the agent itself which is the reasoning and decision-making entity
  • Harnesses solve three core engineering challenges: context degradation management, security sandboxing, and generalizability through decoupling business logic from code
  • Context management techniques include Context Compaction (summarization), Progressive Loading (lazy loading of details), and Context Isolation (sub-agent delegation with fresh contexts)
  • Security sandboxing provides three boundaries: filesystem isolation, network control, and compute constraints to prevent damage from agent mistakes or hijacking
  • The choice between specialized agents and generic harnesses depends on task variability and governance needs: high variability favors harnesses, while low variability with strict compliance requirements favors hardcoded specialized agent graphs

Why It Matters

This distinction between agents and harnesses reframes how AI practitioners should think about building production agentic systems, shifting focus from pure prompt engineering to robust infrastructure design. The framework provides actionable guidance for teams deciding between building custom agent graphs versus deploying generic harnesses, directly impacting scalability and maintainability of AI systems. As LLM capabilities advance, understanding this engineering layer becomes critical for anyone building agents that need to operate reliably in production environments.

Technical Details

  • Agent Loop Architecture: The fundamental agent pattern consists of a recursive loop: user input → LLM reasoning → tool execution → feedback → repeat until goal completion, with the harness managing all infrastructure around this loop
  • Context Management Techniques: Three primary methods address context degradation: Context Compaction uses separate LLM calls to summarize long histories when thresholds (e.g., 80% of context window) are reached; Progressive Loading maintains lean initial contexts by loading tool/business logic details only when needed; Context Isolation spawns sub-agents with fresh context windows for sub-tasks
  • Sandboxing Boundaries: Three-layer security model includes Filesystem Isolation (designated workspaces limiting access to sensitive directories like ~/.ssh), Network Control (default deny with explicit API endpoint allowlists), and Compute Constraints (execution timeouts, memory limits, privilege stripping)
  • Decoupling Business Logic: Harnesses enable non-developers to customize agent behavior through markdown-based "skills" and "plugins" containing business rules, while engineering complexity remains encapsulated in the harness infrastructure
  • Framework Ecosystem: Modern implementations leverage tools like LangGraph and Google's Agent Development Kit (ADK) for specialized agent graphs, while generic harnesses provide reusable infrastructure for diverse task handling

Industry Insight

  • Organizations should invest in harness infrastructure as a foundational layer rather than building bespoke agents for every use case, as this dramatically reduces development time and enables domain specialists to customize behavior without coding
  • The context degradation problem will remain a critical bottleneck even as context windows expand, making intelligent context management a key differentiator for production-grade agentic systems
  • Security sandboxing must be treated as non-negotiable for any agent system with tool access, particularly as agents gain access to increasingly powerful capabilities like terminal execution and API calls

TL;DR

  • Harness是围绕LLM的工程基础设施层,负责上下文管理、工具执行、状态维护和边界控制,与作为决策实体的Agent形成互补而非替代关系
  • 现代Harness通过Context Compaction(上下文压缩)、Progressive Loading(渐进加载)和Context Isolation(上下文隔离)三大技术解决长对话中的上下文退化问题
  • 安全沙箱通过文件系统隔离、网络控制和计算约束三层边界,确保Agent在执行危险操作(如命令行)时不会破坏系统或泄露数据
  • Harness将工程复杂度与业务逻辑解耦,领域专家可通过markdown文件定义"技能"和"插件",无需编写代码即可定制Agent行为
  • 高可变性场景(如个人AI助手)适合通用Harness,低可变性且需严格治理的场景(如企业合规审计)应使用专用Agent图

为什么值得看

这篇文章清晰区分了Agent(决策实体)与Harness(工程基础设施)的概念边界,为AI从业者提供了理解现代Agent系统架构的关键框架。它系统性地解决了Agent工程化中的三大核心挑战——质量、安全和可扩展性,并给出了实用的选型指南。

技术解析

  • 上下文管理三策略:Context Compaction在上下文达到阈值(如80%窗口容量)时自动触发摘要压缩;Progressive Loading初始仅加载业务逻辑和工具的索引,按需加载详情;Context Isolation通过子Agent处理子任务,主Agent仅接收最终结果,避免上下文污染。
  • 安全沙箱三层边界:文件系统隔离限制Agent仅能访问指定工作目录;网络控制默认阻断互联网访问,仅允许明确授权的API端点;计算约束设置执行超时、内存上限并剥离非必要权限。
  • 工程与业务解耦机制:Harness将循环逻辑、上下文管理、沙箱、委托机制等工程复杂度固化,业务逻辑以markdown文件形式由领域专家维护,运行时动态加载并生成Agent工作流。
  • 选型决策框架:基于可变性(Variability)和治理需求(Governance)两个维度,高可变性+低治理要求→Harness,低可变性+高治理要求→专用Agent图(如LangGraph/ADK)。

行业启示

  • AI工程化正从"手搓Agent图"向"Harness+技能配置"范式转变,未来竞争焦点将从框架开发转向技能生态和业务逻辑的积累。
  • 企业部署Agent系统时需建立分层架构:核心合规流程使用专用Agent确保可审计性,开放场景使用Harness提供灵活性。
  • "技能"和"插件"作为业务逻辑的标准化载体,将成为连接领域专家与AI系统的桥梁,推动AI应用从开发者中心向业务用户民主化演进。

Disclaimer: The above content is generated by AI and is for reference only. 免责声明:以上内容由 AI 生成,仅供参考。

Agent Agent LLM 大模型 Research 科学研究