Files
myWiki/concepts/environment-contract-layer.md

37 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
title: "Environment Contract Layer环境契约层"
created: 2026-06-11
updated: 2026-06-11
type: concept
tags: [agent, harness, contract, interface]
sources: [raw/papers/xu-life-harness-runtime-adaptation-2026.md]
---
# Environment Contract Layer
> Life-Harness 的第①层:在交互开始前,校准并增强模型可见的环境契约,使稳定的环境约束显式化。
## 机制
该层操作在模型开始与环境的交互循环之前,将原始环境契约 C 增强为 C = C ⊕ ΔC其中 ΔC 是从训练轨迹和环境策略中导出的**精简约束更新**。
ΔC 通常包含:
- 工具应如何调用的规范
- 在当前环境协议下哪些动作是合法的
- 环境特定的常见陷阱和避免策略
## 为什么需要
在 Life-Harness 的失败诊断中,**环境契约不匹配Environment Contract Mismatch**占所有失败的约 33%——这是最高频的单一失败类别。Agent 生成了语法正确的工具调用,但违反了环境的调用协议或策略约束。这些问题**无法通过更强的推理能力解决**——需要的是更清晰、更精确的接口约定。
## 与其他层的关系
- 与 [[procedural-skill-layer|程序技能层]] 互补:契约层提供"什么是合法的",技能层提供"怎么做好"
- 为 [[action-realization-layer|动作实现层]] 提供验证依据
- 在 [[runtime-harness-adaptation|Runtime Harness Adaptation]] 中处于优先级最高的位置
## 参考
- [[xu-life-harness|Life-Harness 论文]]
- [[action-realization-layer|动作实现层]]
- [[deterministic-agent-failures|确定性 Agent 失败分类]]